-
Notifications
You must be signed in to change notification settings - Fork 142
Conversation
@@ -12,7 +12,7 @@ At its core, the Consent Manager empowers your visitors to control and customize | |||
|
|||
It works by taking control of the analytics.js load process to only load destinations that the user has consented to and not loading analytics.js at all if the user has opted out of everything. The user's tracking preferences are saved to a cookie and sent as an identify trait (if they haven't opted out of everything) so that you can also access them on the server-side and from destinations (warehouse). | |||
|
|||
*Segment works to ensure the Consent Manager Tech Demo works with most of our product pipeline. We cannot ensure it works in your specific implementation or website. Please contact our Professional Services team for implementation support. Please see the License.txt included.* | |||
_Segment works to ensure the Consent Manager Tech Demo works with most of our product pipeline. We cannot ensure it works in your specific implementation or website. Please contact our Professional Services team for implementation support. Please see the License.txt included._ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are prettier changes; My changes are adding documentation for cdnHost
@@ -88,7 +88,7 @@ | |||
"lodash-es": "^4.17.10", | |||
"nock": "^9.2.5", | |||
"preact": "^10.0.0", | |||
"prettier": "1.18.2", | |||
"prettier": "^1.19.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bumping this to the latest 1.x.x version because 1.18.2
fails on the nullish coalescing operator ??
operator
defaultDestinationBehavior={defaultDestinationBehavior} | ||
workspaceAddedNewDestinations={workspaceAddedNewDestinations} | ||
/> | ||
return ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are prettier changes, aside from adding cdnHost
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
@@ -324,6 +324,49 @@ describe('ConsentManagerBuilder', () => { | |||
) | |||
}) | |||
|
|||
test('a different cdn is used when cdnHost is set', done => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! If possible, it would be great to add an example to the storybook.
Hey, since the example will be identical as the two basic examples except for using the new property, I think it would be best if we don't create another example. I've updated the readme so people can discover the |
Added configurable CDN host
This PR added a new prop
cdnHost
toConsentManager
andConsentManagerBuilder
with a default value ofcdn.segment.com
which is the same as the existing behavior. This allows users to use their own CDN instead of Segment's.Testing
Testing is done via unit tests and story book on my local dev environment.
Default behavior is unchanged
React component: Setting cdnHost to another CDN
Standalone script: Setting cdnHost to another CDN