-
Notifications
You must be signed in to change notification settings - Fork 56
Add docs for GTM v4 #1103
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
Merged
Add docs for GTM v4 #1103
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
98 changes: 98 additions & 0 deletions
98
...urces/trackers/google-tag-manager/ecommerce-tag-template/configuration/index.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
--- | ||
title: Ecommerce Tag Configuration | ||
sidebar_position: 100 | ||
--- | ||
|
||
```mdx-code-block | ||
import Tabs from '@theme/Tabs'; | ||
import TabItem from '@theme/TabItem'; | ||
``` | ||
|
||
## Ecommerce API | ||
|
||
Use the native Snowplow Ecommerce API or [transitional GA4/UA ecommerce adapter APIs](/docs/sources/trackers/javascript-trackers/web-tracker/tracking-events/ecommerce/index.md#ga4ua-ecommerce-transitional-api) for existing dataLayer implementations using those formats. To get full value from the [Snowplow Ecommerce plugin](/docs/sources/trackers/javascript-trackers/web-tracker/tracking-events/ecommerce/index.md) we recommend using the native API when possible. | ||
|
||
 | ||
|
||
## Tracking Parameters | ||
|
||
<Tabs groupId="ecommerceAPI" queryString> | ||
<TabItem value="sp" label="Snowplow Ecommerce" default> | ||
|
||
 | ||
|
||
#### Snowplow Ecommerce Function | ||
|
||
In this section you can select the [Snowplow Ecommerce function](/docs/sources/trackers/javascript-trackers/web-tracker/tracking-events/ecommerce/index.md) to use. | ||
|
||
#### Snowplow Ecommerce Argument | ||
|
||
In this textbox you can specify the argument to the ecommerce function. This can be a Variable that evaluates to a corresponding object. | ||
|
||
#### Additional Tracking Parameters | ||
|
||
##### Add Custom Context Entities | ||
|
||
Use this table to attach [custom context entities](/docs/sources/trackers/javascript-trackers/web-tracker/tracking-events/index.md#custom-context) to the Snowplow event. Each row can be set to a Google Tag Manager variable that returns an array of custom contexts to add to the event hit. | ||
|
||
##### Set Custom Timestamp | ||
|
||
Set this to a UNIX timestamp in case you want to [override the default timestamp](/docs/sources/trackers/javascript-trackers/web-tracker/tracking-events/index.md#setting-the-true-timestamp) used by Snowplow. | ||
|
||
</TabItem> | ||
<TabItem value="ga4" label="GA4 Ecommerce"> | ||
|
||
 | ||
|
||
#### GA4 Ecommerce Function | ||
|
||
In this section you can select the [Google Analytics 4 Ecommerce function](/docs/sources/trackers/javascript-trackers/web-tracker/tracking-events/ecommerce/index.md) to use. | ||
|
||
#### GA4 Ecommerce Arguments | ||
|
||
##### DataLayer ecommerce | ||
|
||
Here you can specify the dataLayer ecommerce variable to use, i.e. a variable that returns the `ecommerce` object itself. | ||
|
||
##### Options object | ||
|
||
Here you can specify a variable returning an object holding additional information for the ecommerce event (e.g. including `currency`, `finalCartValue`, `step`, etc). | ||
|
||
</TabItem> | ||
<TabItem value="ua" label="Universal Analytics Enhanced Ecommerce"> | ||
|
||
 | ||
|
||
#### Universal Analytics Enhanced Ecommerce Function | ||
|
||
In this section you can select the [Universal Analytics Enhanced Ecommerce function](/docs/sources/trackers/javascript-trackers/web-tracker/tracking-events/ecommerce/index.md) to use. | ||
|
||
#### Universal Analytics Enhanced Ecommerce Arguments | ||
|
||
##### DataLayer ecommerce | ||
|
||
Here you can specify the dataLayer ecommerce variable to use. | ||
|
||
##### Options object | ||
|
||
Here you can specify a variable returning an object holding additional information for the ecommerce event (e.g.including currency, finalCartValue, step etc). | ||
|
||
</TabItem> | ||
</Tabs> | ||
|
||
## Snowplow Tracker and Ecommerce Plugin Settings | ||
|
||
 | ||
|
||
### Tracker Settings | ||
|
||
The Snowplow Ecommerce tag template **requires** a Snowplow Settings Variable to be setup. In this section you can select the Google Tag Manager variable of type [Snowplow Settings](/docs/sources/trackers/google-tag-manager/quick-start/index.md) to use. | ||
|
||
### Plugin Settings | ||
|
||
In this section you can select how the plugin will be added. The available options are: | ||
|
||
- `jsDelivr`: To get the plugin URL from jsDelivr CDN. Choosing this option allows you to specify the plugin version to be used. | ||
- `unpkg`: To get the plugin URL from unpkg CDN. Choosing this option allows you to specify the plugin version to be used. | ||
- `Self-hosted`: To get the plugin library from a specified URL. This option requires a [Permission](https://developers.google.com/tag-platform/tag-manager/templates/permissions) change to allow injecting the plugin script from the specified URL. | ||
- `Do not add`: To not add the plugin (e.g. when using a [Custom Bundle](/docs/sources/trackers/javascript-trackers/web-tracker/plugins/configuring-tracker-plugins/index.md) with the plugin already included). The default plugins bundled with the JavaScript tracker has changed from v3 to v4. Ensure that all plugins that you require are included. A list of the default plugins is available [here](/docs/sources/trackers/javascript-trackers/web-tracker/plugins/index.md). |
33 changes: 33 additions & 0 deletions
33
docs/sources/trackers/google-tag-manager/ecommerce-tag-template/index.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
title: Ecommerce Template | ||
sidebar_position: 600 | ||
--- | ||
|
||
The Ecommerce Template is a separate Tag Template that can be added to your GTM workspace to track ecommerce events. This was done to keep the main Snowplow Tag Template a bit lighter, and for ease of tag management. | ||
|
||
This template implements the [Snowplow Ecommerce plugin](/docs/sources/trackers/google-tag-manager/ecommerce-tag-template/index.md) for the Snowplow JavaScript tracker and can be used alongside either [v3](/docs/sources/trackers/google-tag-manager/previous-versions/index.md) or [v4](/docs/sources/trackers/google-tag-manager/index.md) of the Snowplow tag. | ||
|
||
|
||
|
||
## Template Installation | ||
|
||
### Tag Manager Template Gallery | ||
|
||
Search for "Snowplow Ecommerce v3" in the [Tag Manager Template Gallery](https://tagmanager.google.com/gallery/#/owners/snowplow/templates/snowplow-gtm-tag-template-ecommerce-v3) and click `Add to Workspace`. | ||
|
||
### Manual Installation | ||
|
||
1. Download [template.tpl](https://github.com/snowplow/snowplow-gtm-tag-template-ecommerce-v3) | ||
greg-el marked this conversation as resolved.
Show resolved
Hide resolved
|
||
2. Create a new Tag template in the Templates section of your GTM container | ||
3. Click the More Actions menu and select Import | ||
4. Import the `template.tpl` file downloaded in Step 1 | ||
5. Click Save | ||
|
||
## Tag Setup | ||
|
||
With the template installed, you can now add the Snowplow Ecommerce Tag to your GTM Container. | ||
|
||
1. From the Tag tab, select `New`, then select the Snowplow Ecommerce Tag as your tag type | ||
2. Select your desired Trigger for the ecommerce events you want to track | ||
3. [Configure the Tag](/docs/sources/trackers/google-tag-manager/ecommerce-tag-template/configuration/index.md) | ||
4. Click Save |
greg-el marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
title: "Google Tag Manager" | ||
date: "2020-08-10" | ||
sidebar_position: 135 | ||
--- | ||
|
||
|
||
```mdx-code-block | ||
import Badges from '@site/src/components/Badges'; | ||
|
||
<Badges badgeType="Actively Maintained"></Badges> | ||
``` | ||
|
||
Using the Snowplow GTM custom templates you can deploy, implement, and configure the Snowplow [JavaScript tracker](/docs/sources/trackers/javascript-trackers/index.md) directly on the website using Google Tag Manager. | ||
|
||
The main Tag template that you will need to use when setting up the JavaScript Tracker v4 in GTM is available in the [Tag Manager Template Gallery](https://tagmanager.google.com/gallery/#/owners/snowplow/templates/snowplow-gtm-tag-template-v4). To setup the Snowplow v4 Tag, you will also need the Snowplow v4 Settings Variable template. The templates you will need are: | ||
|
||
1. [Snowplow v4](https://tagmanager.google.com/gallery/#/owners/snowplow/templates/snowplow-gtm-tag-template-v4): | ||
Load, configure, and deploy the Snowplow JavaScript tracker library. It supports the full functionality of the JavaScript SDK. | ||
greg-el marked this conversation as resolved.
Show resolved
Hide resolved
jethron marked this conversation as resolved.
Show resolved
Hide resolved
|
||
2. [Snowplow v4 Settings](https://tagmanager.google.com/gallery/#/owners/snowplow/templates/snowplow-gtm-variable-template-v4): | ||
A variable template which can be used to easily apply a set of tracker configuration parameters to tags created with the Snowplow v4 tag template. | ||
|
||
For Ecommerce tracking, the [Snowplow Ecommerce Tag](https://github.com/snowplow/snowplow-gtm-tag-template-ecommerce-v3) is available on GitHub. | ||
|
||
```mdx-code-block | ||
import DocCardList from '@theme/DocCardList'; | ||
|
||
<DocCardList /> | ||
``` |
6 changes: 4 additions & 2 deletions
6
...ustom-template/previous-versions/index.md → ...le-tag-manager/previous-versions/index.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...mplate-for-javascript-tracker-v2/index.md → ...mplate-for-javascript-tracker-v2/index.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
docs/sources/trackers/google-tag-manager/previous-versions/v3/index.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
title: JavaScript Tracker v3 Templates | ||
sidebar_position: 0 | ||
--- | ||
|
||
```mdx-code-block | ||
import DocCardList from '@theme/DocCardList'; | ||
|
||
<DocCardList /> | ||
``` |
File renamed without changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+15.8 KB
.../ecommerce-tag-template/ecommerce-tag-configuration/images/01_ecommerce_api.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+18.7 KB
...-tag-template/ecommerce-tag-configuration/images/02_ga4_tracking_parameters.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+30.6 KB
...e-tag-template/ecommerce-tag-configuration/images/02_sp_tracking_parameters.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+20.5 KB
...e-tag-template/ecommerce-tag-configuration/images/02_ua_tracking_parameters.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+27 KB
...-tag-template/ecommerce-tag-configuration/images/04_tracker_plugin_settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+83.2 KB
...us-versions/v3/v3-tags/tag-template-guide/images/adding_parameters_manually.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+20.7 KB
...ersions/v3/v3-tags/tag-template-guide/images/additional_tracking_parameters.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+56 KB
...sions/v3/v3-tags/tag-template-guide/images/enableAnonymousTracking_argument.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+159 KB
...3/v3-tags/tag-template-guide/images/enableAnonymousTracking_custom_variable.png
Oops, something went wrong.
Binary file added
BIN
+10.7 KB
...evious-versions/v3/v3-tags/tag-template-guide/images/host_drop_down_no_load.png
Oops, something went wrong.
Binary file added
BIN
+32.9 KB
...manager/previous-versions/v3/v3-tags/tag-template-guide/images/load_plugins.png
Oops, something went wrong.
Binary file added
BIN
+26.6 KB
...versions/v3/v3-tags/tag-template-guide/images/modifying_breaks_gallery_link.png
Oops, something went wrong.
Binary file added
BIN
+182 KB
...revious-versions/v3/v3-tags/tag-template-guide/images/modifying_permissions.png
Oops, something went wrong.
Binary file added
BIN
+14.8 KB
...r/previous-versions/v3/v3-tags/tag-template-guide/images/search_snowplow_v3.png
Oops, something went wrong.
Binary file added
BIN
+67 KB
...ag-manager/previous-versions/v3/v3-tags/tag-template-guide/images/setUserId.png
Oops, something went wrong.
Binary file added
BIN
+26.2 KB
...evious-versions/v3/v3-tags/tag-template-guide/images/tracker_initialization.png
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.