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

Add docs for GTM v4 #1103

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add docs for GTM v4 #1103

wants to merge 1 commit into from

Conversation

greg-el
Copy link
Contributor

@greg-el greg-el commented Dec 16, 2024

This PR updates the GTM documentation in preparation for the release of the updated v4 GTM and settings tags.

The goal for this was to position the documentation for users that may be new to GTM/Snowplow and potentially have little JS experience, by providing a step-by-step getting started guide and simplifying a few other steps to get going, but still retaining the more advanced usage for other users.

It also moves GTM out of being a sub-category of the JavaScript tracker, and into the main line-up of trackers for better visibility.

Copy link

netlify bot commented Dec 16, 2024

Deploy Preview for snowplow-docs ready!

Name Link
🔨 Latest commit b4d89a4
🔍 Latest deploy log https://app.netlify.com/sites/snowplow-docs/deploys/675f79011f2f2d0008f0485b
😎 Deploy Preview https://deploy-preview-1103--snowplow-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@greg-el greg-el force-pushed the gtm-v4 branch 2 times, most recently from 5c403f1 to 3958976 Compare December 16, 2024 00:39
sidebar_position: 600
---

Snowtype can be used with Google Tag Manager. Follow [this guide](docs/data-product-studio/snowtype/working-with-gtm/) to get set up.
Copy link
Contributor

Choose a reason for hiding this comment

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

This need a leading / to be absolute; it's relative atm and 404s. (see https://deploy-preview-1103--snowplow-docs.netlify.app/docs/sources/trackers/google-tag-manager/snowtype/)

Also per the README, internal links should link to the actual .md file so they can be checked properly, which should catch this issue..


:::warning

If the generated code is too large for Google Tag Manager, you can split it into multiple variables and include them in the order they are generated, or place directly into a Custom HTML tag.
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not fond of the way we have implemented this if this is the legitimate solution. 😅

sidebar_position: 400
---

This template implements the [Snowplow JavaScript tracker](/docs/sources/trackers/javascript-trackers/web-tracker) for Google Tag Manager.
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing .md file again here. The script in the README will hopefully fix a bunch of them at once for you.

---
title: "Google Tag Manager"
date: "2020-08-10"
sidebar_position: 3100
Copy link
Contributor

Choose a reason for hiding this comment

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

Pretty sure this is a little more popular than the ActionScript tracker; can we bump it up higher in the list?

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like you haven't removed the old files in "Web trackers / Tracker setup" yet?

Ideally any exact page copies (if any) are git mv'd so the file history is maintained.
We will likely also need redirects.

Doing this retroactively may suck, if so you can probably skip it.


:::info

We reccomend migrating to the [Snowplow Ecommerce Tag](/docs/sources/trackers/google-tag-manager/ecommerce-tag-template/index.md) template to take advantage of the latest ecommerce tracking features.
Copy link
Contributor

Choose a reason for hiding this comment

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

s/reccomend/recommend/


:::

---
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this rule can be removed?


### Page View

You can provide a Custom Page Title if you wish, and you can add a [custom context](/docs/sources/trackers/javascript-trackers/web-tracker/tracking-events/index.md#custom-context) to the request, as also described [here](/docs/sources/trackers/javascript-trackers/web-tracker/tracking-events/index.md#trackpageview).
Copy link
Contributor

Choose a reason for hiding this comment

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

Both these anchors are missing from the destination page.

Comment on lines +219 to +220
Note that this tag enables the tracker's native [Link Click Tracking plugin](/docs/sources/trackers/javascript-trackers/web-tracker/tracking-events/link-click/index.md), it does not directly fire an event.
It is intended to trigger [early on a page](https://support.google.com/tagmanager/answer/7679319) to begin listening for click events, _not_ to trigger on click events like [Click Triggers](https://support.google.com/tagmanager/answer/7679320).
Copy link
Contributor

Choose a reason for hiding this comment

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

This only applies when using the Enable Automatic Link Click Tracking option. You can probably move it next to that and s/this tag/this setting/.


### Custom Commands

For any other commands which are supported by the Snowplow JavaScript Tracker v3, you can select the [Custom Command] option. Once select, you can enter any function name and the associated parameter for that function. The parameter can either be a simple string, in examples such as `setUserId`:
Copy link
Contributor

Choose a reason for hiding this comment

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

s/v3/v4/
s/once select/once selected/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants