Solved

Track referrals by query parameter

  • 8 August 2022
  • 1 reply
  • 272 views

Hi. I am exploring Heap as an alternative to Google Analytics as their new platform is awful!

 

I have an urgent use case in which I need to track visits to our home page by referring company. All the initial referral visits have a query parameter like this:
<website.com?referral=CompaniesCode>

I would love a dashboard where I can see visits per day by company code. We will then want to evolve this to track user journeys based on where they originated from. I couldn’t find any direct help articles so hoping I can get some references and quick start information to help us out here. 

icon

Best answer by Trevin 10 August 2022, 22:07

View original

1 reply

Userlevel 5
Badge +4

Hi. I am exploring Heap as an alternative to Google Analytics as their new platform is awful!

 

I have an urgent use case in which I need to track visits to our home page by referring company. All the initial referral visits have a query parameter like this:
<website.com?referral=CompaniesCode>

I would love a dashboard where I can see visits per day by company code. We will then want to evolve this to track user journeys based on where they originated from. I couldn’t find any direct help articles so hoping I can get some references and quick start information to help us out here. 

You can make an event where you define it like this:

domain = website.com

AND

path = /

AND

query contains “referral=CompaniesCode”

Then on the report you can do either a “count” or “count unique” on that event.

Notes:

  • Domain filter will be unnecessary if heap is only installed on one domain
  • If you are tracking more than just the homepage, adjust your path accordingly (or omit it)

Another way to uplevel this, is for you to create a defined property, where based on the query substring, you can then set the property to a partner’s name.

 

Reply