Skip to content
LogoLogo

How to install the GTM template

This guide shows you how to track an ecommerce event in Google Tag Manager and send it to Picked. You need a GTM container and your Picked Tag ID.

Automatic installation

Install the template from the GTM Community Gallery:

  1. In Tag Manager, click Templates.
  2. In the Tag Templates section, click Search Gallery.
  3. Search for Picked Ecommerce.
  4. Click the Picked Ecommerce template to read its detail.
  5. Click the Add to workspace button.
  6. Read the permissions that it needs.
  7. Click Add.

The Picked Ecommerce template in the GTM Community Gallery

Manual installation

To import the template file yourself:

  1. Download the template file from GitHub with the download icon.
  2. In Google Tag Manager, go to Templates.
  3. Click New.
  4. Open the three-dot menu.
  5. Click Import.
  6. Choose the file that you downloaded.
  7. Click Save.

Setup

1. Create a Tag ID variable

Sign in to the Picked Dashboard and copy the Tag ID of your project. Save it as a constant variable in GTM, for example Picked Tag ID.

How to create a variable in GTM for the Picked Tag ID

2. Create an ecommerce data variable

Create a Data Layer Variable with the variable name ecommerce. It captures what GA4 Enhanced Ecommerce writes to the data layer.

The variable for the data layer of GA4 Enhanced Ecommerce

3. Create event triggers

Add a trigger for each ecommerce event that you want to track, for example add_to_cart, purchase, or view_item.

The event triggers that record an ecommerce event

4. Create tags

Create a new tag for each event. Choose the tag template called Picked Ecommerce. Assign the trigger that matches. Then set the options below.

The tags that use the Picked Ecommerce template

Options

OptionDescription
Tag IDThe Tag ID of your Picked project. Find it in the Picked Dashboard.
EventThe ecommerce event to track, for example add_to_cart or purchase.
Send ecommerce dataTurn this on to send the data from GA4 Enhanced Ecommerce to Picked. Turn it on for every ecommerce event.
GA4 Enhanced Ecommerce DataThe GTM variable that holds the data from GA4 Enhanced Ecommerce. Use the data layer variable from step 2.
Additional dataAn optional GTM variable, for more metadata with the event.

The options on a Picked Ecommerce tag