tezvyn:

How do you attribute signups to Facebook, Google, and blog campaigns?

AI-drafted, machine-checkedSource: Wikipedia: UTM parametersbeginner

This tests URL-based campaign attribution and session persistence. A strong answer covers UTM tags, landing page parsing, cookie storage, and writing the source to the user record at signup.

WHAT THIS TESTS: The interviewer wants to see if you can bridge marketing requirements and engineering implementation by building a first-party attribution chain. They care about data integrity, not just naming conventions.

A GOOD ANSWER COVERS: First, append unique UTM parameters to each campaign URL, for example utm_source=facebook or google or blog, utm_medium=cpc or organic, and utm_campaign=a specific identifier. Second, on the landing page, parse those query parameters with JavaScript or server-side logic and store the attribution data in a first-party cookie or browser session storage. Third, set an expiration such as 30 days so the attribution survives browsing sessions. Fourth, when the user completes signup, read that stored value and write it into the user record or send it as an event property to your analytics warehouse. Fifth, acknowledge that you need a policy for direct traffic or returning users who no longer carry the UTM parameters.

COMMON WRONG ANSWERS: A major red flag is suggesting that users fill out a survey or self-report how they found you. Another weak answer is relying exclusively on Facebook Pixel or Google Ads conversion tags without storing the attribution in your own database, which makes reconciliation impossible. Simply looking at the HTTP referer header on signup is also insufficient because referer is often stripped and does not distinguish between specific campaigns.

LIKELY FOLLOW-UPS: The interviewer may ask how you would handle a user who clicks the Facebook ad on day one, the Google ad on day seven, and then signs up on day ten. They may also ask how to prevent iOS 17 link tracking parameter stripping from breaking your attribution, or how you would validate that your attribution numbers match the ad platforms within a five to ten percent margin.

ONE CONCRETE EXAMPLE: Imagine the blog campaign URL is example.com/signup?utm_source=blog&utm_medium=organic&utm_campaign=march_launch. When a visitor lands, your React app reads the URL, strips the parameters, and writes utm_source=blog into a cookie named attribution_source with a max-age of 2592000 seconds. At signup, your API reads the cookie and sets the acquisition_source column on the users table to blog. A nightly ETL job then compares your database counts per utm_campaign against the cost data from each platform to calculate blended CAC.

Read the original → en.wikipedia.org

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.