Skip to content

feat: support appcues integration custom domain option#811

Open
zhukevgeniy wants to merge 1 commit intosegmentio:masterfrom
zhukevgeniy:support-appcues-custom-domain
Open

feat: support appcues integration custom domain option#811
zhukevgeniy wants to merge 1 commit intosegmentio:masterfrom
zhukevgeniy:support-appcues-custom-domain

Conversation

@zhukevgeniy
Copy link
Copy Markdown

What does this PR do?
This PR adds a custom domain (also known as CNAME) option for appcues integration.
Currently, the only way to use a custom domain for appcues is to integrate directly with their SDK,
So by providing this custom option, a user will still be able to use appcues as a segment integration.

Link: https://docs.appcues.com/dev-installing-appcues/host-appcues-sdk-under-your-own-domain

Are there breaking changes in this PR?
NO

Testing
No special tests are needed

Any background context you want to provide?

Is there parity with the server-side/android/iOS integration components (if applicable)?

Does this require a new integration setting? If so, please explain how the new setting works

Links to helpful docs and other external resources

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for hosting the Appcues SDK under a custom domain (CNAME) while still using the Segment Appcues integration, by allowing the script host to be configured via an integration option.

Changes:

  • Add a new domain integration option for Appcues.
  • Update the Appcues loader to build the script URL from domain + appcuesId.
  • Extend the Appcues integration test settings to include the new domain option.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 4 comments.

File Description
integrations/appcues/lib/index.js Introduces domain option and uses it to construct the Appcues SDK script URL.
integrations/appcues/test/index.test.js Updates settings expectations and test options to include domain.
.gitignore Ignores JetBrains .idea/ directory.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Appcues.prototype.load = function(callback) {
var id = this.options.appcuesId || 'appcues';
load('//fast.appcues.com/' + id + '.js', callback);
var domain = this.options.domain || '//fast.appcues.com/';
Comment on lines +51 to +52
var domain = this.options.domain || '//fast.appcues.com/';
load(domain + id + '.js', callback);
var options = {
appcuesId: '1663'
appcuesId: '1663',
domain: '//fast.appcues.net/'
Comment on lines 49 to +52
Appcues.prototype.load = function(callback) {
var id = this.options.appcuesId || 'appcues';
load('//fast.appcues.com/' + id + '.js', callback);
var domain = this.options.domain || '//fast.appcues.com/';
load(domain + id + '.js', callback);
@mdkhan-tw
Copy link
Copy Markdown

Please review the comments from Copilot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants