Skip to content
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

Merged
merged 11 commits into from
Jul 30, 2024
Merged

Conversation

huang-julien
Copy link
Member

🔗 Linked issue

❓ Type of change

It's such a joy to work with Types🤷‍♂️ Julien Huang - 2024

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).

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Copy link

vercel bot commented Jul 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
scripts-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 28, 2024 3:03pm
scripts-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 28, 2024 3:03pm

@huang-julien huang-julien changed the title fix(tpc): define tpc types with use return type fix(tpc): update to 1.2.0 Jul 24, 2024
@huang-julien huang-julien changed the title fix(tpc): update to 1.2.0 fix(tpc): update to 2.0.0 Jul 24, 2024
@huang-julien huang-julien changed the title fix(tpc): update to 2.0.0 fix(tpc): update tpc to 2.0.0 Jul 24, 2024
returnStub: 'fn === \'dataLayer\' ? [] : void 0',
defaultOptions: {
dataLayerName: 'defaultGtm',
l: 'defaultGtm',
Copy link
Collaborator

@harlan-zw harlan-zw Jul 25, 2024

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

scripts/utils.ts Outdated Show resolved Hide resolved
@huang-julien huang-julien marked this pull request as draft July 25, 2024 21:42
@huang-julien
Copy link
Member Author

waiting for GoogleChromeLabs/third-party-capital#59 (no breaking changes) to remove default options (l)

@huang-julien huang-julien marked this pull request as ready for review July 27, 2024 23:20
Copy link
Contributor

@flashdesignory flashdesignory left a comment

Choose a reason for hiding this comment

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

LGTM

@huang-julien huang-julien changed the title fix(tpc): update tpc to 2.1.0 fix(tpc): update tpc to 2.1.1 Jul 28, 2024
@harlan-zw harlan-zw merged commit 09e3c2f into main Jul 30, 2024
4 checks passed
@harlan-zw harlan-zw changed the title fix(tpc): update tpc to 2.1.1 fix(tpc): support customizing dataLayer variable Jul 30, 2024
@harlan-zw harlan-zw deleted the feat/return_use_type branch July 30, 2024 02:13
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