How does campaign tracking work?

Keytiles provides support for tracking traffic of your website coming from campaigns based on the philosophy defined in UTM parameters. Let's clarify a few details here!

Content of this page

What is tracked / supported?

For Campaigns Keytiles is tracking

  • Name
    which identifies your campaign or promotion. E.g. "weekly newsletter".
  • Medium
    The medium the visitor used to arrive to your website. E.g. "email" / "weblink" or for ads "ppc" (pay per click) is also often used.
  • Content
    From which exact content the visitor clicked / interacted with to follow your Campaign. E.g. this could be an "I'm interested" button somewhere on your page / in your newsletter email. Or some more specific content like "Main page of website", "Recommendation box" to just give a few. This helps you to further understand your sources.

Technically speaking what you send in to Keytiles in any of the above Campaign attributes they are all just simple texts / strings. What do they mean exactly? It's really up to you! Keytiles does not tie your hands anyhow here. There are many best practices and approaches available to follow - we encourage you to pick up and implement one!

Your website traffic is segregated by all three above Campaign attributes. So later you can query your traffic based on any of the above.

Note: Name is mandatory!

The only requirement from Keytiles side is that you MUST send the name of the Campaign at least! Otherwise Keytiles omits Medium and Content parameters (which are coming in without campaign name).

To check if this has happened or not and fix issues please check our Checking and Troubleshooting the tracking article!

How to send in Campaign data?

Option 1 - using UTM parameters in URLs

A matching subset of UTM parameters are automatically supported. The supported UTM parameters are:

  • utm_campaign - for Name
  • utm_medium - for Medium
  • utm_content - for Content

This means when you send in events Keytiles is able to recognize presence of the above UTM parameters in the content url (well, the tileUrl more specifically - see "Hit attributes" developer docs) and automatically extracts names from it.

Option 2 - explicitly sending in Campaign attributes in events

You can programmatically and explicitly send in the above Campaign data along with the event.

If you are doing this from JavaScript in your webpage and using our TrackingScript API then you can check the .trackEvent() method description for more details how to do this!

If you have integrated your native iOS / Android or similar app with Keytiles and using our HitCollection API then check the campaignData entry in the OpenApi contract!

How to see / check Campaign traffic?

See on TileView

TileView is giving you insights on your Campaign traffic out of the box.

Just watch this video quickly to get onboarded how it works!

tileview-campaigns.jpg

(clicking it takes you to YouTube: https://youtu.be/F0FXb0IQIqo)

Query via API

Of course you can also filter your API queries for Campaign attributes. Just check our QueryAPI contract!

Both /v2/stat/webhits/{containerId}/eventcounts and /v2/stat/webhits/{containerId}/eventcounts/tiles traffic query endpoints support filtering and grouping data due to Campaign attributes.

For simple filtering check the campaignsOnlycampaignMediumsOnly and campaignContentsOnly parameters descriptions!

If you prefer group the traffic by any of the above then check the groupBy parameter description and focus on "campaignXXX" items!