Table of Contents


About Google Analytics

The IBIS E-Commerce platform supports Google Tag Manager - a system used to manage your own code snippets (known as tags) for conversion tracking, site analysis, remarketing, and many more. The biggest benefit of using Google Tag Manager is that it makes it easier for marketers to implement tags without having to rely on IBIS developers to do it for them. GTM features close integration with Google Analytics, and you can use the Tag Manager to configure and deploy your Google Analytics tag configurations easily.




Set up GA4 property and set tracking in Google Tag Manager

The screen capture below shows the GA4 set-up process on Google Tag Manager step-by-step.


Set up cross-domain tracking for iframe in GA4

You need the Editor privilege on your Google Analytics property to set up the following.

  1. Login to Google Analytics and select your GA4 property.
  2. Click the Admin button on the left, click the Data Streams in the Property column then select the Web Data Stream.
  3. Click More Tagging Settings option in the Additional Settings section.
  4. Click Configure your domains option.
  5. Click the Add condition button, list all your domains then Save.


GA4 ecommerce event snippets and how to access their data

The following GA4 ecommerce event snippets will be added when we migrate to our new IBIS E-Commerce platform.

Item Data Overview changes 

We have worked to provide data consistency through each of the GA4 events in order to build more concise analytics reports for our customers. We have therefore reshuffled the order of the data within the item datalayer.

  • There will be one item per price option (Adult, Child, Infant etc.) for each GA4 event, this helps breakdown the contents of the cart in earlier events.
  • We have removed data from item_catagory2, we may return to this as we develop IBIS functionality.
  • We have broken down the cart, per price option therefore the view_item_list event has been removed.
  • add_payment_info event has been added.


With New E-commerce you will now see the following data in the below order for all GA4 events under items:

  • item_id = Item PLU code
  • quantity = Quantity of price option selected.
  • item_name = Product Name
  • item_brand = ""
  • item_category = Booking, Retail, Membership etc
  • item_variant = Price Option
  • affiliation = "IBIS E-Commerce"
  • price = Price


View Item

  • Tag type: GA4 Event
  • Event name: view_item
  • Event parameters: itemsvalue, currency

Pages this tag is fired:

  • Page: Booking/Appointments (/Booking/New)
  • Page: Booking/Activity (activity/add)
  • Page: Hire (/Booking/Hire)
  • Page: Retail item details (/Retail/New)
  • Page: Gift voucher details (/GiftVoucher/add)
  • Page: Membership details (/Membership/New)
DATA STRUCTURE
dataLayer.push({
  event: "view_item",
  ecommerce: {
    currency: "NZD",
    value: "100.00",
    items: [
      {
        item_id: "1000",
quantity: 2
        item_name: "Tourism Cruise",
item_brand: "",
coupon: "",
location_id: "Online"
        item_category: "Booking",
        item_category2: "",
        item_category3: "",
        item_category4: "",
        item_category5: "",
        item_list_id: "",
        item_list_name: "",
        item_variant: "Adult",
affiliation: "IBIS E-Commerce"
        price: 100,
item_list_id: "",
item_list_name: "",
index: 1001,
      },
      {
        item_id: "1000",
        quantity: 1
item_name: "Tourism Cruise",
item_brand: "",
coupon: "",
location_id: "Online"
item_category: "Booking",
item_category2: "",
item_category3: "",
item_category4: "",
item_category5: "",
item_list_id: "",
item_list_name: "",
item_variant: "Child",
affiliation: "IBIS E-Commerce"
price: 50,
item_list_id: "",
item_list_name: "",
        index: 1001
      },

Add to Cart

  • Tag type: GA4 Event
  • Event name: add_to_cart
  • Event parameter: itemsvalue, currency

Pages this tag is fired:

  • Page: Admission ticket details (/Ticket/New)
  • Page: Event ticket details (/Events/New)
  • Page: Booking/Appointments (/Booking/New)
  • Page: Hire (/Booking/Hire)
  • Page: Retail item details (/Retail/New)
  • Page: Gift voucher details (/GiftVoucher/New)
  • Page: Membership details (/Membership/New)
dataLayer.push({
  event: "add_to_cart",
  ecommerce: {
    currency: "NZD",
    value: "201.00",
    items: [
      {
        item_id: "1000",
        item_name: "Tourism Cruise",
        affiliation: "IBIS E-Commerce",
        coupon: "",
        currency: "",
        discount: 0,
        index: 1,
        item_brand: "",
        item_category: "Booking",
        item_category2: "",
        item_category3: "",
        item_category4: "",
        item_category5: "",
        item_list_id: "",
        item_list_name: "",
        item_variant: "Adult",
        location_id: "Online",
        price: 100,
        quantity: 2
      },
      {
        item_id: "1000",
        item_name: "Toursim Cruise",
        affiliation: "IBIS E-Commerce",
        coupon: "",
        currency: "",
        discount: 0,
        index: 1,
        item_brand: "",
        item_category: "Booking",
        item_category2: "",
        item_category3: "",
        item_category4: "",
        item_category5: "",
        item_list_id: "",
        item_list_name: "",
        item_variant: "Child",
        location_id: "Online",
        price: 50,
        quantity: 1
      }
    ]
  },

View Cart

  • Tag type: GA4 Event
  • Event name: view_cart
  • Event parameters:
    • currency
    • value
    • items

Pages this tag is fired:

  • Page: Cart (/Cart)
dataLayer.push({
  event: "view_cart",
  ecommerce: {
    currency: "NZD",
    value: "202.39",
    coupon: null,
    payment_type: null,
    tax: null,
    shipping: null,
    items: [
      {
        item_id: "1000",
        item_name: "Tourism Cruise",
        affiliation: "IBIS E-Commerce",
        coupon: "",
        currency: "",
        discount: 0,
        index: 1,
        item_brand: "",
        item_category: "Booking",
        item_category2: "",
        item_category3: "",
        item_category4: "",
        item_category5: "",
        item_list_id: "",
        item_list_name: "",
        item_variant: "Adult",
        location_id: "Online",
        price: 100,
        quantity: 2
      },
      {
        item_id: "1000",
        item_name: "Tourism Cruise",
        affiliation: "IBIS E-Commerce",
        coupon: "",
        currency: "",
        discount: 0,
        index: 1,
        item_brand: "",
        item_category: "Booking",
        item_category2: "",
        item_category3: "",
        item_category4: "",
        item_category5: "",
        item_list_id: "",
        item_list_name: "",
        item_variant: "Child",
        location_id: "Online",
        price: 50,
        quantity: 1
      },

Remove from Cart

  • Tag type: GA4 Event
  • Event name: remove_from_cart
  • Event parameter: items, value, currency

Pages and actions this tag is fired:

  • Page: Cart (/Cart), Action: Remove item button click
  • Page: Cart (/Cart), Action: Reset cart button click
dataLayer.push({
  event: "remove_from_cart",
  ecommerce: {
    currency: "NZD",
    value: "175.00",
    items: [
      {
        item_id: "1000",
        item_name: "Toursim Cruise",
        affiliation: "IBIS E-Commerce",
        coupon: "",
        currency: "",
        discount: 0,
        index: 1,
        item_brand: "",
        item_category: "Booking",
        item_category2: "",
        item_category3: "",
        item_category4: "",
        item_category5: "",
        item_list_id: "",
        item_list_name: "",
        item_variant: "Adult",
        location_id: "Online",
        price: 100,
        quantity: 1
      },
      {
        item_id: "1000",
        item_name: "Tourism Cruise",
        affiliation: "IBIS E-Commerce",
        coupon: "",
        currency: "",
        discount: 0,
        index: 1,
        item_brand: "",
        item_category: "Booking",
        item_category2: "",
        item_category3: "",
        item_category4: "",
        item_category5: "",
        item_list_id: "",
        item_list_name: "",
        item_variant: "Child",
        location_id: "Online",
        price: 75,
        quantity: 1
      }
    ]
  },

Begin Checkout

  • Tag type: GA4 Event
  • Event name: begin_checkout
  • Event parameter: items

Pages this tag is fired:

  • Page: Your details (/Customer/PayForCart)
dataLayer.push({
  event: "begin_checkout",
  ecommerce: {
    currency: "NZD",
    value: "105.69",
    coupon: null,
    payment_type: null,
    tax: null,
    shipping: null,
    items: [
      {
        item_id: "901",
        item_name: "Online booking fee (0.69%)",
        affiliation: "IBIS E-Commerce",
        coupon: "",
        currency: "",
        discount: 0,
        index: 2,
        item_brand: "",
        item_category: "Surcharge",
        item_category2: "",
        item_category3: "",
        item_category4: "",
        item_category5: "",
        item_list_id: "",
        item_list_name: "",
        item_variant: null,
        location_id: "Online",
        price: 0.69,
        quantity: 1
      },
      {
        item_id: "996",
        item_name: "Website postage PLU to New Zealand",
        affiliation: "IBIS E-Commerce",
        coupon: "",
        currency: "",
        discount: 0,
        index: 1000,
        item_brand: "",
        item_category: "Postage",
        item_category2: "",
        item_category3: "",
        item_category4: "",
        item_category5: "",
        item_list_id: "",
        item_list_name: "",
        item_variant: null,
        location_id: "Online",
        price: 5,
        quantity: 1
      },

Add Payment Info

  • Tag type: GA4 Event
  • Event name: add_payment_info
  • Event parameters:
    • transaction_id
    • value
    • currency
    • items

Pages this tag is fired:

  • Page: Your Payment Details (/Customer/PayForCart)
dataLayer.push({
  event: "add_payment_info",
  ecommerce: {
    currency: "NZD",
    value: "201.38",
    coupon: null,
    payment_type: null,
    tax: null,
    shipping: null,
    items: [
      {
        item_id: "1000",
        item_name: "Single component",
        affiliation: "IBIS E-Commerce",
        coupon: "",
        currency: "",
        discount: 0,
        index: 1,
        item_brand: "",
        item_category: "Booking",
        item_category2: "",
        item_category3: "",
        item_category4: "",
        item_category5: "",
        item_list_id: "",
        item_list_name: "",
        item_variant: "Adult",
        location_id: "Online",
        price: 100,
        quantity: 2
      },
      {
        item_id: "901",
        item_name: "Online booking fee (0.69%)",
        affiliation: "IBIS E-Commerce",
        coupon: "",
        currency: "",
        discount: 0,
        index: 2,
        item_brand: "",
        item_category: "Surcharge",
        item_category2: "",
        item_category3: "",
        item_category4: "",
        item_category5: "",
        item_list_id: "",
        item_list_name: "",
        item_variant: null,
        location_id: "Online",
        price: 1.38,
        quantity: 1
      }
    ]
  },

Purchase

  • Tag type: GA4 Event
  • Event name: purchase
  • Event parameters:
    • transaction_id  (Transaction ID = POS ID & Itinerary ID)
    • affiliation
    • value
    • tax
    • shipping
    • coupon
    • country
    • currency
    • items

Pages this tag is fired:

  • Page: Confirmation (/Receipt)
dataLayer.push({
  event: "purchase",
  ecommerce: {
    currency: "NZD",
    value: "100.69",
transaction_id: "xxxxx"
    coupon: null,
    payment_type: null,
    tax: null,
    shipping: null,
    items: [
      {
        item_id: "1000",
        item_name: "Tourism Cruise",
        affiliation: "IBIS E-Commerce",
        coupon: "",
        currency: "",
        discount: 0,
        index: 1,
        item_brand: "",
        item_category: "Booking",
        item_category2: "",
        item_category3: "",
        item_category4: "",
        item_category5: "",
        item_list_id: "",
        item_list_name: "",
        item_variant: "Adult",
        location_id: "Online",
        price: 100,
        quantity: 1
      },
      {
        item_id: "901",
        item_name: "Online booking fee (0.69%)",
        affiliation: "IBIS E-Commerce",
        coupon: "",
        currency: "",
        discount: 0,
        index: 2,
        item_brand: "",
        item_category: "Surcharge",
        item_category2: "",
        item_category3: "",
        item_category4: "",
        item_category5: "",
        item_list_id: "",
        item_list_name: "",
        item_variant: null,
        location_id: "Online",
        price: 0.69,
        quantity: 1
      }
    ]
  },

You can access the data (the revenue object in the Purchases snippet in this example) in Google Tag Manager in the following manner.

  1. Login to Google Tag Manager and select your container.
  2. Select Variables from the left-hand side menu, then click New in the User-Defined Variables section.
  3. Name this variable (for example "Ecommerce Purchase Revenue"), click the icon in the middle of the Variable Configuration section and select Data Layer Variable under Page Variables.
  4. Add ecommerce.value in the Data Layer Variable Name field then click Save.
  5. You can invoke this revenue object with the following syntax {{Ecommerce Purchase Revenue}}, like this snippet example below:
    var $revenue = {{Ecommerce Purchase Revenue}};
    console.log('Revenue: ' + $revenue);


Set up GA4 ecommerce event tracking in Google Tag Manager

The screen capture below shows how to set up GA4 ecommerce purchase event step-by-step.

Below screen capture shows how to set up additional GA4 ecommerce events (view_item, add_to_cart, view_cart, remove_from_cart, begin_checkout and add_payment_info)) step by step


Set up a referral exclusion list in GA4

You need the Editor privilege on your Google Analytics property to set up the following.

  1. Login to Google Analytics and select your GA4 property.
  2. Click the Admin button on the left, click the Data Streams in the Property column then select the Web Data Stream.
  3. Click More Tagging Settings option in the Additional Settings section.
  4. Click List unwanted referrals option.
  5. Click the Add condition button, list all the domains you want to exclude as traffic source then Save.

Since there's a limit of 50 conditions in the unwanted referrals list, we recommend having the following as "Referral domain contains" match type to exclude 3D secure providers as referrals.

Update the list when you find a new one in your Analytics report also.

3d
aasc.nz
acsweb-pa.dnp-cdms.jp
acs.
ansimclick.hyundaicard.com
arcot.com
authenticationweb
bankserv.co.za
betalen.rabobank.nl
cap.attempts.securecode.com
cardinalcommerce.com
cardsecurity
cmbchina.com
dkb.de
esecure
hdfcbank.com
hume.cardinalcommerce.com
hyundaicard.com
ibsbjstar.ccb.com.cn
lloydstsb.com
lottecard.co.kr
luottokunta.fi
mastercardsecurecode.sparkassen-kreditkarten.de
mycardsecure.com
portal.afterpay.com
ps4acs.netcetera-payment.ch
s3-us-west-2.amazonaws.com
sas.redsys.es
sec.paymentexpress.com
secure.barclaycard.co.uk
secureauthentication.apac.citibank.com
securecode.com
secureshopping
securesuite
site-auditor.online
swedbank.se
thecardservicesonline.com
thepaymentsplace.com.au
touchtechpayments.com
tsys.arcot.com
verifiedbyvisa
visa.com
wlp-acs.com
yalamanchili.in
demo-uat.ibisnz.com


Send GA4 events to multiple Google Analytics properties

If you have multiple IBIS E-Commerce websites under one IBIS system (i.e. multi-branding) and if you wish to send traffic and event data to separate Google Analytics properties, please see the screen capture below.

What's demonstrated in the clip is to set up a general GA4 configuration and an add_to_cart event for a specific URL (book.ibis.co.nz in this example). You set up the other GA4 ecommerce events in the same manner and repeat the process for the other IBIS E-Commerce websites you may have.

Set up Facebook pixel tracking or other 3rd party services on Google Tag Manager

Facebook Pixel, and any other third-party or custom services that work in a similar way, can be installed on your IBIS E-Commerce website via Google Tag Manager. Below are the steps for how to install Facebook Pixel, use this as an example if configuring other third-party services.


Step 1: Set the Facebook Pixel Base Code

  1. Login to Google Tag Manager and select your container.
  2. Select Tags from the left-hand side pane, then click New.



  3. Name the Tag (Facebook Pixel - Base Code in this example)
  4. Click the icon in the middle in the Tag Configuration section, then select Custom HTML from the right-hand side pane.



  5. Copy and paste the Facebook Pixel Base Code into the HTML field, then click and expand the Advanced Settings.
  6. From Advanced settings, select Once per page from the Tag firing options menu, then set All Pages as a trigger and Save your changes.