Installing GrowthHero Pixel script

To start tracking your referral links and engagements, you need to install the GrowthHero pixel script onto your website. You need a GrowthHero account to install the script. Alternatively, you can use Google Tag manager to add a tracking pixel to your website.

This is only for Standalone accounts. If your account is Shopify / BigCommerce, this setup is not necessary.

Installation steps

To install the Pixel script, paste the following snippet on all your pages inside the <head> section. 

<script type="text/javascript" src="https://api.growthhero.io/cdn/assets/pixel.js"></script>
<script>
  GrowthHero.init("YOUR_PIXEL_ID")
</script><br>

Replace YOUR_PIXEL_ID with your account pixel ID. You can get your pixel ID from Settings > Tracking Setup.

Now all your referral links and engagements will be tracked automatically!

Options

Following options are available with the pixel script you can make use of.

GrowthHero.init(pixel_id)

This is the initialisation method that starts the script. Pass the pixel ID from your Settings > Tracking Setup

GrowthHero.recordEngagement()

By default the script records an engagement event after 15 seconds or registering a referral link click (if user visited using a referral link). You can override it and record the engagement event before the 15 second by calling this method.

GrowthHero.recordAddToCart()

Use this event to record an add to cart event. This event when combined with the automated order tracking integration, will link the referred partner with the order. The cartToken will be used to identify and link the orders with the clicks and engagements activity, thereby linking the appropriate partner with the order.

Example

<script>
  GrowthHero.recordAddToCart('cartToken')
</script>
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us