We keep an eye on initial_referrer
(via headers in middleware.ts
) and UTM params (via attribution.js
and the AttributionCapture
component), and store these on local storage. In the case that the user eventually signs up, we save that information on their profiles row.
There are no annoying questionnaires or cookies that follow folks around the internet. It’s a privacy-first system for loosely keeping track of where new users sign up from. This is turn helps us with our community organising, as we can see where to focus our future efforts.
For example, if we do a tonne of work engaging local councils and get no traffic from them, and little effort but a lot of traffic from, say, Reddit or Facebook, we know to focus on the latter (and/or refine our council approach).
We just do our best to get this basic information silently and just from the original referrer: “where did we first acquire this user from?”. That means that later (unlikely) referrals or UTM params are ignored, if others are already set in the local storage.
The attribution flow works as follows:
The http_referrer
column on the profiles
table simply tracks *request*.headers.get("referer")
in middleware. That’s just the root URL of a website, even if a subpage sent the person. For example: https://www.noosa.qld.gov.au
.
The UTM columns (utm_source
, utm_medium
, utm_campaign
) are captured in attribution.js
, stored in localStorage, and then read and saved upon signUpAction
, as described in the above.
Add the following UTM parameters to the Peels website link whenever you organise a partner to share Peels on our behalf. Local government partners love to know the impact of their promoting of Peels during workshops, in their newsletters, and so on.
UTM Parameter | Purpose | Example Values | Best Practices |
---|---|---|---|
utm_source |
Where the traffic is coming from (the referrer) | reddit, twitter, google, newsletter | Keep it lowercase, no spaces (_ or - instead) |
utm_medium |
How the link was shared (the marketing channel) | social, email, cpc (cost-per-click ads), referral | Standardize across platforms to avoid messy data |
utm_campaign |
Why this traffic exists (the specific initiative) | launch_promo, new_feature, organic_share | Name it clearly and uniquely per campaign |
Here are some hypothetical examples for digital sources:
Sharing in a Facebook Group:
<https://www.peels.app?utm_source=facebook&utm_medium=social&utm_campaign=group_name_here>
Having a council share Peels (direct to map) form their website:
<https://www.peels.app/map?utm_source=sunshine%2Bcoast%2Bcouncil&utm_medium=referral>
Sharing in an in-person workshop or flyer:
<https://www.peels.app?utm_source=sunshine%2Bcoast%2Bcouncil&utm_medium=offline&utm_campaign=workshop_name>
Here are some real-world examples (from our promo kit) for offline sources:
Material | utm_source | utm_medium | utm_campaign |
---|---|---|---|
Letter Drop Flyers | flyer | offline | letter_drop |
Stall | stand | offline | public_outreach |
Tear-Off Poster | poster | offline | community_board |
Workshop Slide | workshop_slide | offline | educational_talk |
Window Sticker | window_sticker | offline | business_display |