-
Notifications
You must be signed in to change notification settings - Fork 38
Improve GTM guides #225
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
Improve GTM guides #225
Conversation
WalkthroughThe documentation for configuring Google Tag Manager (GTM) server-side tracking with Dub was restructured from a custom step-based format to a markdown heading and list format. Instructions were clarified, UI navigation references updated, and screenshots added, but no technical instructions or logic were changed. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 2
🧹 Nitpick comments (6)
conversions/leads/google-tag-manager.mdx (6)
5-5
: Quote frontmatter value (avoid YAML parse edge-cases).Unquoted URLs in YAML frontmatter can be parsed unexpectedly. Quote the value (and optionally the key for consistency with Line 3).
-og:image: https://assets.dub.co/cms/gtm-integration.jpeg +"og:image": "https://assets.dub.co/cms/gtm-integration.jpeg"
136-143
: Fix alt text to match the Tag Template import step.The screenshot alt references “Client Template” in the Tag Template section; adjust for accuracy.
- alt="GTM Import Client Template" + alt="GTM Import Tag Template"
207-215
: Be explicit about the trigger variable (use the same name as in the tag config).You refer to a variable “that contains the event type.” To reduce ambiguity, reference the eventName emitted by the Dub Server Client.
-- Select **Custom Event** as the trigger type -- Set the **Event Name** to match the event name from the Dub Server Client. Default is `dub_conversion` -... - - **Variable**: Select a variable that contains the event type +- Select **Custom Event** as the trigger type +- Set the **Event Name** to match the event name from the Dub Server Client. Default is `dub_conversion`. +... + - **Variable**: Select the variable mapped to `eventName` - **Operator**: Equals - - **Value**: "Sign Up" + - **Value**: Sign Up
73-73
: Tone/style: tighten phrasing.“You’d want to” reads tentative. Prefer direct instructional tone.
-Next, you'd want to create a new GTM Server Client using the imported template. +Next, you'll want to create a new GTM Server Client using the imported template.
160-160
: Trim wordiness (“Last but not least”).Per style lint, tighten to “Finally”.
-Last but not least, you'll want to create a new GTM Server Tag using the imported template. +Finally, create a new GTM Server Tag using the imported template.
156-160
: Add a publish step (prevent “works in Preview but not live”).After creating the client/tag and trigger, readers should submit and publish the server container changes; otherwise, production traffic won’t be processed.
### 5. Add Lead Tracking Tag @@ - Name the trigger "Dub Lead Event Trigger" and save it + +### 6. Publish your server container + +- Click **Submit** in the top right of your GTM server container. +- Add a descriptive version name (e.g., “Add Dub Client + Lead Tag”). +- Click **Publish** to make the changes live.Also applies to: 205-215
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (8)
images/conversions/google-tag-manager/gtm-choose-client-type.png
is excluded by!**/*.png
images/conversions/google-tag-manager/gtm-choose-tag-type.png
is excluded by!**/*.png
images/conversions/google-tag-manager/gtm-import-client-template.png
is excluded by!**/*.png
images/conversions/google-tag-manager/gtm-new-client-template.png
is excluded by!**/*.png
images/conversions/google-tag-manager/gtm-new-server-client.png
is excluded by!**/*.png
images/conversions/google-tag-manager/gtm-new-tag-template.png
is excluded by!**/*.png
images/conversions/google-tag-manager/gtm-new-tag.png
is excluded by!**/*.png
images/conversions/google-tag-manager/gtm-server-client-template.png
is excluded by!**/*.png
📒 Files selected for processing (1)
conversions/leads/google-tag-manager.mdx
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
conversions/leads/google-tag-manager.mdx
[style] ~159-~159: ‘Last but not least’ might be wordy. Consider a shorter alternative.
Context: ...emplate. ### 5. Add Lead Tracking Tag Last but not least, you'll want to create a new GTM Server...
(EN_WORDINESS_PREMIUM_LAST_BUT_NOT_LEAST)
🔇 Additional comments (2)
conversions/leads/google-tag-manager.mdx (2)
101-101
: Confirm request path matches the test URL.Client Request Path is set to
/dub/track
(Line 101), while the curl test uses/dub/track/lead
(Line 223). In GTM Server, some client templates treat Request Path as an exact match, others as a prefix.
- If exact match is required, change Request Path to
/dub/track/lead
.- If prefix matching is intended, add a note clarifying that
/dub/track
will match subpaths like/dub/track/lead
.Would you like me to update the doc accordingly?
Also applies to: 222-224
173-174
: Align template naming (avoid confusion between “Dub Conversion Tag” vs “Dub GTM Server Tag Template”).Earlier you import the “Dub GTM Server Tag Template,” but here the selection says “Dub Conversion Tag.” If the installed tag’s display name is “Dub Conversion Tag,” mention that explicitly in Step 4 to keep terminology consistent; otherwise, rename here.
Example edit if the tag label is “Dub GTM Server Tag”:
-Under **Tag Configuration**, select the **Dub Conversion Tag** server tag template that you created in step 4. +Under **Tag Configuration**, select the **Dub GTM Server Tag** template that you imported in step 4.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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.
Actionable comments posted: 0
♻️ Duplicate comments (2)
conversions/sales/google-tag-manager.mdx (2)
81-81
: Use the raw GitHub URL so users download the .tpl, not HTML.Linking to the “blob” page downloads HTML instead of the template file. Switch to the raw URL.
-Download the [gtm-server-client-template/template.tpl](https://github.com/dubinc/gtm-server-client-template/blob/main/template.tpl) file and upload it to the Template Editor. You'll see a preview of the template: +Download the [gtm-server-client-template/template.tpl](https://raw.githubusercontent.com/dubinc/gtm-server-client-template/main/template.tpl) file and upload it to the Template Editor. You'll see a preview of the template:
178-178
: Same issue for the tag template – use the raw URL.Avoid the “blob” URL here as well to ensure direct .tpl download in GTM.
-Download the [gtm-server-tag-template/template.tpl](https://github.com/dubinc/gtm-server-tag-template/blob/main/template.tpl) file and upload it to the Template Editor. You'll see a preview of the template: +Download the [gtm-server-tag-template/template.tpl](https://raw.githubusercontent.com/dubinc/gtm-server-tag-template/main/template.tpl) file and upload it to the Template Editor. You'll see a preview of the template:
🧹 Nitpick comments (8)
conversions/sales/google-tag-manager.mdx (4)
169-176
: Alt text mismatch: this section is importing a Tag template, not a Client template.Update alt text for clarity/accessibility.
- alt="GTM Import Client Template" + alt="GTM Import Tag Template"
191-196
: Tighten wording (“Last but not least” → “Finally,”).Minor style improvement per language guidance.
-Last but not least, you'll want to create a new GTM Server Tag using the imported template. +Finally, create a new GTM Server Tag using the imported template.
125-131
: Clarify Request Path behavior vs example URLs with subpaths.You set Request Path to
/dub/track
, but later examples use/dub/track/sale
. Confirm the Dub GTM Server Client matches nested paths (e.g.,/dub/track/*
). If not, either:
- Update Request Path to allow subpaths, or
- Adjust examples to hit exactly
/dub/track
.
239-249
: Be explicit about the trigger variable for event type.To reduce ambiguity, specify which variable (e.g., a Variable reading
eventName
from the client event) should be used in the condition.Example:
- Variable: eventName
- Operator: Equals
- Value: Purchase
conversions/leads/google-tag-manager.mdx (4)
133-142
: Alt text mismatch: this section is importing a Tag template, not a Client template.Update alt text for clarity/accessibility.
- alt="GTM Import Client Template" + alt="GTM Import Tag Template"
156-159
: Tighten wording (“Last but not least” → “Finally,”).Minor style improvement per language guidance.
-Last but not least, you'll want to create a new GTM Server Tag using the imported template. +Finally, create a new GTM Server Tag using the imported template.
96-102
: Clarify Request Path behavior vs example URL with subpath.Request Path is
/dub/track
, but the cURL example calls/dub/track/lead
. Confirm the client matches nested routes (e.g.,/dub/track/*
). If not, update either the Request Path or the examples accordingly.
203-212
: Be explicit about the trigger variable for event type.Specify the exact variable to use (e.g.,
eventName
) to minimize confusion when setting the trigger condition.Example:
- Variable: eventName
- Operator: Equals
- Value: Sign Up
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
conversions/leads/google-tag-manager.mdx
(2 hunks)conversions/sales/google-tag-manager.mdx
(2 hunks)
🧰 Additional context used
🪛 LanguageTool
conversions/leads/google-tag-manager.mdx
[style] ~157-~157: ‘Last but not least’ might be wordy. Consider a shorter alternative.
Context: ...emplate. ### 5. Add Lead Tracking Tag Last but not least, you'll want to create a new GTM Server...
(EN_WORDINESS_PREMIUM_LAST_BUT_NOT_LEAST)
conversions/sales/google-tag-manager.mdx
[style] ~192-~192: ‘Last but not least’ might be wordy. Consider a shorter alternative.
Context: ...mplate. ### 5. Add Sales Tracking Tag Last but not least, you'll want to create a new GTM Server...
(EN_WORDINESS_PREMIUM_LAST_BUT_NOT_LEAST)
🔇 Additional comments (2)
conversions/sales/google-tag-manager.mdx (1)
256-272
: Double-checkmode=async
support and the/dub/track/sale
path.
- Confirm that the Dub Server Client and Tag handle the
mode=async
parameter (ignored or used) without side effects.- Ensure
/dub/track/sale
is accepted given the Request Path configuration.conversions/leads/google-tag-manager.mdx (1)
220-235
: Double-checkmode=async
support and the/dub/track/lead
path.
- Verify that
mode=async
is handled (ignored or utilized) safely by your client/tag.- Ensure
/dub/track/lead
is captured by the client given the Request Path configuration.
Summary by CodeRabbit