Skip to content

Conversation

steven-tey
Copy link
Contributor

@steven-tey steven-tey commented Aug 8, 2025

Summary by CodeRabbit

  • Documentation
    • Improved and restructured the Google Tag Manager server-side tracking setup guides for leads and sales conversions with clearer steps and updated UI navigation.
    • Reformatted instructions into numbered sections and bulleted lists, added updated screenshots, and enhanced explanatory notes for better readability.
    • Included labeled code blocks for example curl commands and consolidated repeated tips for streamlined guidance.

Copy link
Contributor

coderabbitai bot commented Aug 8, 2025

Walkthrough

The 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

Cohort / File(s) Change Summary
GTM Server-Side Tracking Documentation
conversions/leads/google-tag-manager.mdx, conversions/sales/google-tag-manager.mdx
Rewrote and restructured documentation from component-based steps to numbered markdown sections and bulleted lists; updated UI navigation paths, clarified instructions, added screenshots and tips/notes components, reformatted example curl commands with labeled code blocks; no changes to technical content or logic.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐇
With markdown neat and steps anew,
GTM guides are clear for you.
Screenshots shine and lists align,
Instructions crisp, by design.
Docs re-hopped, no code to mend—
A bunny’s work, from start to end!

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch improve-gtm

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 8e0d52a and 95ada7b.

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

steven-tey and others added 2 commits August 7, 2025 18:59
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@steven-tey steven-tey merged commit c9c00d4 into main Aug 8, 2025
1 check passed
@steven-tey steven-tey deleted the improve-gtm branch August 8, 2025 02:02
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 95ada7b and dd1a239.

📒 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-check mode=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-check mode=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.

This was referenced Sep 19, 2025
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.

1 participant