Employing tracking in Shoptet using GTM

Employing tracking in Shoptet using GTM

 

 

A guide for the GTM setup for e-shops in Shoptet.

  1. create an account at https://tagmanager.google.com/#/home
  2. add your website. Tag Manager will generate for you a code from which to take your ID. Example: GTM-XXXXXX
  3. insert your GTM ID in Shoptet administration in the box for Google Tag Manager ID and tick off the use of Google Data Layer Helper
  4. in Tag Manager create a tag for click tracking “Affil Dognet – click tracking“ as custom HTML where to insert the click tracking code (the code to be supplied by us). The trigger is every page (All pages)
  5. in Tag Manager create trigger ”DOM ready”
  6. create a tag for tracking sales ”Affil Dognet – sale tracking“ as custom HTML where to insert the sale tracking code (the code to be supplied by us). The trigger is DOM ready. In enhanced settings, set up the tag so as to be run in any event.
  7. in this step you have already created 2 tags and 1 trigger
  8. configurate Variables so as to have checked off all in Pages, Utilities, Clicks and Forms
  9. publish all changes

If necessary, contact us, we can also set up GTM for you 😉

 

Click tracking code

”XXXXXXXXXXX“ needs to be substituted for your account ID

“YYYYYYY“ needs to be substituted for your campaign ID

 

<script type="text/javascript" id="pap_x2s6df8d" src="https://login.dognet.sk/scripts/fj27g82d"></script>
<script type="text/javascript">
PostAffTracker.setAccountId('XXXXXXXXXXX');
try {
var CampaignID='YYYYYYY';
PostAffTracker.track();
} catch (err) { }
</script>

 

Sale tracking code

“XXXXXXXXXXX“ needs to be substituted for your account ID

“YYYYYYY“ needs to be substituted for your campaign ID

 

<script type="text/javascript" id="pap_x2s6df8d" src="https://login.dognet.sk/scripts/fj27g82d"></script>
<script type="text/javascript">
var dataHelper = new DataLayerHelper(dataLayer);

if (dataHelper.get('shoptet.pageType') == 'thankYou') { 

  PostAffTracker.setAccountId('XXXXXXXXXXX');
var sale = PostAffTracker.createSale();
sale.setCampaignID('YYYYYYY');
sale.setTotalCost(dataHelper.get('shoptet.order.netto'));
sale.setOrderID(dataHelper.get('shoptet.order.orderNo'));
sale.setCurrency(dataHelper.get('shoptet.order.currencyCode'));
PostAffTracker.register();

}
</script>
Katka Novotná
Katka Novotná

Viac ako dva roky som pracovala na pozícií e-commerce marketér a zvyšovala som obraty rôznym eshopom. Niektoré z nich sa vyšplhali až na Shop Roku (ocenenie od Heureka.sk). Mám skúsenosti s PPC Adwords aj Facebook. Analytics mi je veľmi blízky. Pre reklamnú agentúru Wiktor Leo Burnett som pomáhala s UX/UI webových projektov a aplikácií pre veľkých klientov. Vo voľnom čase tvorím webové stránky založené prevažne na WordPresse.

More articles that might interest you

Which campaigns are available in our network?