Your environment must be updated to our 200.851.42 Package or later.
2. Update the Google UK Tracking Code field
Log into your Salesforce environment and navigate to ‘Sites’. This process will need to be followed on each site.
Scroll down the page to ‘Google UA Tracking Code’. This field has four conditions that should be populated:
1. G- code (the GA4 code which replaces the UA code)
2. Origin url (your main public website domain that traffic is coming from)
3. GTM code (provided by Google Analytics)
4. url for the analytics handler (optional)
Each condition should be separated by a semicolon.
Please watch the video below which demonstrates the steps described above:
Your ‘Google UA Tracking Code’ should now look similar to this:
You can copy the contents of this field to each of your Sites within the same Brand.
3. Ensure attribution of your site visitors
Next, add the code below to your Public Website. Usually this would be located in the Header of your Homepage. Change the blue text (including the blue square brackets) with your company’s G- code and BookNow domain:
<!– Google tag (gtag.js) –>
<script async src=”https://www.googletagmanager.com/gtag/js?id=G-[your code]“></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag(‘js’, new Date());
gtag(‘set’, ‘linker’, {‘domains’: [‘[your BookNow domain, eg demo.booknow.software]‘]});
gtag(‘config’, ‘G-[your code]‘);
</script>
If you require assistance on this then please seek help from your Website provider or Marketing team.
———
Please note that these instructions rely on your Google Analytics being set up on GA4. If you are new to Google Analytics or need to update your set up from Universal Analytics, we recommend you speak to an expert. Hookflash have supported a number of our customers and we are pleased to recommend them.
When your Tags are set up in GTM, the GA4 integration provides a full e-commerce solution, by tracking the following interactions with your pages:
- View Item (view_item)
- Add to Cart (add_to_cart)
- Remove from Cart (remove_from_cart)
- Begin Checkout (begin_checkout)
- Add Payment Info (add_payment_info)
- Purchase (purchase)