Installing GrowthHero Pixel script

22To 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 available.

Installation steps

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

<script type="text/javascript" src="https://api.growthhero.io/cdn/assets/pixel.js"></script>
<script>
  GrowthHero.init("YOUR_PIXEL_ID")
  GrowthHero.autoTrackEmail()
</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!

Installing GrowthHero script on different platforms

If you're a user of any of the following platforms, we've gathered some tutorials on how to install custom code inside your pages in there.

Options

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

GrowthHero.init(pixel_id)

This is the initialization 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 seconds by calling this method.

GrowthHero.recordAddToCart()

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

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