-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(tpc): support customizing dataLayer variable #176
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
use
return type
scripts/generateTpcScripts.ts
Outdated
returnStub: 'fn === \'dataLayer\' ? [] : void 0', | ||
defaultOptions: { | ||
dataLayerName: 'defaultGtm', | ||
l: 'defaultGtm', |
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.
this should be undefined by default so we aren't adding it to the URL unless it's specified, we fallback to dataLayer
for both GA and GTM
waiting for GoogleChromeLabs/third-party-capital#59 (no breaking changes) to remove default options ( |
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.
LGTM
🔗 Linked issue
❓ Type of change
With the latest and futur changes of TPC, it is better to make the API type of tpc composables depending on the return type of the use function instead of the API provided by TPC since it will differ for implementations reasons. This PR will also fixes a type issue with datalayer since it does not exist anymore in type provided by TPC (datalayers exist tho).
📚 Description