Adding the tracking script using Google Tag Manager

Thomas Garp -

Example of how to implement Raptor using GTM

This is an example of a GTM implementation that we have used on several of our customers. The implementation may differ from your website, but the following documentation will give you an idea of how to get started.

We recommend that you also read Googles own documentation of how to implement GTM

Disclaimer:

The order of parameters in the tracking script may differ from customer to customer. Please refer to the exact order of parameters in our controlpanel

 

Step 1: Create Variables

Create the following variables to be used in the tags. 

 

Raptor - customer id

Type: Custom Javascript

Remember to replace value with the actual customer account  id given to you by Raptor

 

 

Raptor - current product

Type: DataLayer Variable

Name: ecommerce.detail.products.0

  

Raptor - basket content

Type: DataLayer Variable

Name: ecommerce.checkout.products

 

Raptor - purchased products

Type: DataLayer Variable

Name: ecommerce.purchase.products

 

 

Raptor - category path

Type: Custom Javascript

According to our documentation, Raptor needs a category path in the following form:

A semicolon separated list of category id's and names, corresponding to the breadcrumb path of the product. The data format should be:

"CategoryId1#CategoryName1;CategoryId2#CategoryName2"

For example: "25#Herre;11#Efterår;10#Fodtøj,23#Støvler;"

The following is an example for a product which has the category format : "XXX/YYY/ZZZ":

 

 

Currency Code

Type: Datalayer variable

Name: ecommerce.currencyCode

 

 

Step 2: Create a Raptor Global Tag

Type: Custom HTML

Trigger: The Tag must be set to fire on all pages

Event Type: DOM Ready

 

 

 

Step 3: Create a "visit" Tag

Type: Custom HTML

Trigger: All Product page views

Event Type: DOM Ready

Priority: 20 (higher than the global tag)

 

 

 

 

Step 4: Create a "basket" tag

Type: Custom HTML 

Trigger: All basket events (add to basket, remove from basket, checkout page)

Event Type: DOM Ready

Priority: 20 (higher than the global tag)

 

 

 

Step 5: Create a "buy" tag

Type: Custom HTML

Trigger: Buy success page

Event Type: DOM Ready

Priority: 20 (higher than the global tag)

 

 

And then you're done!

You can check that the tags are working, by referring to the "Live Tracking stream" in the Raptor control panel

 

Have more questions? Submit a request

Comments

Powered by Zendesk