ReferralHero
  • Welcome to the Support Center
  • Common Questions
  • Features
    • Subscribers
      • Subscriber Profile
      • Unique Identifier
      • Active Visitors
      • 'Quick Add' Referral
      • Update Referral Status
    • Campaign Templates
      • Contest
      • Website Referral Analysis
      • Net Promoter Score
    • Unique Identifier
      • Phone Number
      • Confirmation Email
        • Thank-You Page
    • Automations
      • A/B Test
    • Security
      • Manual Review & Confirmation
      • Secondary Verification Method
      • High Risk
      • Blacklist
      • ReCaptcha
    • Reward
      • Reward Status
      • Advanced Reward Options
      • Transactions
    • Analytics
      • Active Visitors
      • Subscribers
      • Sources
      • Shares
      • Devices
      • Unsubscribers
    • Misc
      • Memorable referral links
      • 1-Click Signup
      • Forward & Refer
      • Coupon Codes
      • Custom Attribution
  • Integrate
    • Embeddable Widgets
      • Custom Domain
    • Integrations
      • Active Campaign
      • Aweber
      • Blockchain
      • Facebook Pixel
      • Calendly
      • Discord
      • HubSpot
      • Intercom
      • KakaoTalk
      • Klaviyo
      • Mailchimp
      • Salesforce
      • SendLane
      • Slack
      • Stripe
      • Tango Card
      • Telegram
      • Tremendous
      • Twilio
      • Typeform
      • Webhooks
      • Zapier
      • Zoho
    • Platform-specific Instructions
      • Google Tag Manager
      • WordPress
      • Webflow
      • SquareSpace
      • ClickFunnels
      • Unbounce
      • Instapage
      • Shopify
      • Carrd
      • WIX
    • Javascript Web API
      • Getting Started
      • Configuration file
      • Callbacks
      • Add a subscriber
      • Add a Pending Referral
      • Track multi-step conversion events
      • Track Transaction
      • Identify a Subscriber
      • Identify a Referrer
      • Generate Dashboard Widget
      • Generate Sharing-Screen
    • ReactJS
    • REST API
      • Errors
      • Webhooks
      • Objects
      • Endpoint Reference
    • Mobile SDKs
      • iOS SDK
        • Getting Started
        • Public Methods
        • Public Classes
        • API Interaction Methods
      • Android SDK
        • Getting Started
        • Public Methods
        • Public Classes
        • Listeners & Interfaces
      • Flutter SDK
        • Getting Started
        • Public Methods
      • React Native
        • Getting Started
        • Public Methods
        • Mobile App Testing in Development Mode
      • Mobile App Testing in Development Mode
  • API Tutorials
Powered by GitBook
On this page

Was this helpful?

  1. Integrate
  2. Platform-specific Instructions

Google Tag Manager

PreviousPlatform-specific InstructionsNextWordPress

Last updated 10 months ago

Was this helpful?

IMPORTANT

Google Tag Manager is often targeted by AdBlocker and extensions such as Ghostery, which means that some people might block Google Tag Manager when visiting your website. When this happens, ReferralHero will not be loaded.

Step 1: Login in Google Tag Manager and go to the container you want to use.

Step 2: Click Add a new tag.

Step 3: Give it a name (e.g: ReferralHero Tracking Code) and select Custom HTML

Step 4: Go to your campaign dashboard > Installation instructions and copy the Tracking Code

Step 5: In the textarea, paste the ReferralHero Tracking Code.

Step 6: Now we need to tell Google Tag Manager when trigger the script. Scroll down to the Triggering section, click on it and choose when to trigger the tag. We highly recommend selecting All pages to load the ReferralHero Tracking code on all your pages but feel free to set up another targeting rule.

Step 7: Save your tag.

Step 8: Click the Submit button on the upper right-hand side of the page to publish your changes. The ReferralHero Tracking Code will be automatically loaded on every page!

How can I track sign-ups in Google Analytics?

To track a sign-up in Google Analytics simply use the afterSuccess callback and choose which events you want to send.

<script type="text/javascript">
  window.RHConfig = {
      callbacks: {
        afterSuccess: function(output) {
          if (output.response == "subscriber_created") {
            ga('send', 'event', 'ReferralHero', 'sign-up', 'Waiting List');
          }
        }
      }
  }
</script>