Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If you’re using Google Analytics then it is likely you for eCommerce tracking then you’ll have an event (often called ‘purchase’) firing when whenever a purchase sale is made. This event also contains all of the product variables that the preezie pixel needs, therefore The purchase data within this event can also be passed to the preezie pixel at the same time.

Therefore by adding the code below to your checkout confirmation page you can pass the same data to preezie that is sent to your GA to also pass to preezie.

The code to add

Copy In the code snippet below but make sure you replace you will need to check two things:

  1. Update the PRE-123456 value with your preezie id, this id can be found in your CMS by going to Code Snippets > Your preezie id:

    Image RemovedImage Added
  2. Make sure the "ga-purchase" part matches your purchase event name after the ga- prefix.

    e.g. if your event is called purchase it becomes ga-purchase
    if it’s called checkout it would be ga-checkout

Info

Most standard Google Analytics interations use purchase as the event name, but follow these steps below to check yours

<script>
This is the code to copy:

Code Block
breakoutModefull-width
languagejs
<script>
!function(e,t,n,s,p,r){e.prz||((s=e.prz=function(){s.process?s.process.apply(s,arguments):s.queue.push(arguments)}).queue=[],s.t=+new Date,(p=t.createElement(n)).async=1,p.src="https://preeziecdn.azureedge.net/production/prz_pixel.min.js?t="+864e5*Math.ceil(new Date/864e5),(r=t.getElementsByTagName(n)[0]).parentNode.insertBefore(p,r))}(window,document,"script"),prz("init","PRE-123456");

...


</script>

...


<script>

...


window.addEventListener("load", function() {

...


  prz("event", "transaction", "ga-purchase");

...


});

...


</script>

This code should now be added to your checkout confirmation page after the ‘purchase’ event has fired.

Here are two ways of doing this:

Using Google Tag Manager

  1. In your GTM account create a Tag using Custom HTML

  2. Paste in your code from above

    1. It looks like this:

      Image Added
  3. Now add a Trigger that fires this Tag on your checkout confirmation page (note this must fire after your GA purchase event), so an easy way to do this is to use the purchase event as the trigger. Follow these steps:

    1. Create a purchase Trigger that uses a Custom Event of purchase

    2. It looks like this:

      Image Added
  4. Hit Save

No use the GTM preview feature to make a test transaction and see your Tag firing.

Using other methods

Anchor
findevent
findevent
How do I find my GA purchase event name?

...