Overview
Build an attribution system for “conversions” - online purchases and similar events that an advertiser would care about tracking.
- Imagine you run a business where you sell various products online through your website. In order to expand your business, you want to run digital advertisements to drive more traffic, and hopefully more purchases on your site. You’re not sure which platform will perform best, and you want to get as much bang out of your advertising bucks as possible. Therefore, you decide to run ads on 3 platforms: Google, Koah, Facebook, and compare their performance. Specifically, for each platform, you want to measure its conversion volume (how many users bought an item from your website after clicking an ad) and its conversion rate (what percentage of users who visit your site from the ad end up buying an item)?
- The advertising platforms may already measure these metrics, but you want to independently measure them so you can be more confident in the data integrity.
- Therefore, you decide to build a conversion tracking system into your site. You learn about UTM parameters, a marketing tool for attributing web page visits to their source platform and specific ad content. Your task is to build a tracking system that leverages these UTM parameters to measure the aforementioned metrics.
Core requirements
- Demo website
- Build a website for selling products that you can use to test the metrics functionality.
- The website should display multiple products and enable users to “buy” them.
- You can just use fake products, you don’t have to actually process payments or deliver purchased items.
- This website doesn’t have to be pretty, feel free to vibe code it.
- Event tracking
- Log when a user visits your site or makes a purchase.
- Store which ad platform the user came from using UTM parameters. Specifically, use the
utm_source query parameter with values google, koah, and facebook .
- Attribution persistence
- A user might make purchases from a different page than the one they initially land on after clicking an ad. Therefore, you can’t rely on UTM parameters being in the URL query beyond the first page. Figure out a way to attribute purchases back to the UTM param on the initial page, assuming the user stays in the same browser tab when going from landing page to purchase.
- Metrics dashboard
- Build an admin page into your website to display conversion metrics
- This page should display, for each advertising platform:
- User sessions: How many unique users visited the site by clicking the platform’s ads? A user who clicks around multiple products, reloads the site, etc. should only count as 1 user here.
- Purchases: How many unique users made a purchase on your site after clicking the platform’s ads?
- Conversion rate: purchases divided by user sessions, displayed as a percentage.
- Event debugger: the page should display a raw list of all page view and purchase events recorded. For each event, display which ad platform the user came from, what product they bought (for purchases only), and the page URL they were on.
- No need to implement login/auth for this page
Guidelines
- Tech stack: use any web framework/language/database that you like
- AI usage: you may use AI tools if you’d like, but we care about how much you understand your code, how well it solves the problem, and how well you can explain it in your video submission.
- Implementation time: feel free to spend as much or as little time as you feel is necessary to effectively solve this challenge. We expect it will take about 3-4 hours to complete.
- This challenge is motivated by Koah’s conversion tracking, which you are welcome to use as a reference by consulting our docs.
- No need to deploy externally. Testing on your local machine is fine.
Submission instructions
Fill out this Google form to submit your solution: https://forms.gle/uQJaLhoXDw4537dn9. Please make sure you use the same name and email as you used when applying for the job. You’ll need to submit your source code, as a public Google Drive link, as well as a video where you briefly answer the following questions aloud (camera optional but encouraged):
- Describe, at a high level, your backend design for recording page views and purchases.
- What data fields do you store with each event?
- What else might be useful in a real attribution system?