I have a marketing site (site A), and an application site (site B). The sole purpose of site A is to encourage users to register on site B, via various marketing content.
The sites run different Analytics properties, because I want to see stats about app users (number of sessions, browser type, etc) separately from stats about the marketing site. (NB: Maybe there's an easier way to handle this?)
I have goals set up for registrations and payments on site B. My task is this: I want to track where the users who complete the registration and payment goals on site B originally came from - i.e. before they arrived at either site A or site B. This is so that I can check which ads and other sources are most likely to generate paying customers.
The users' paths to the registration goal could be follows:
- Twitter ad -> Landing page on site B -> Register on site B
- Third-party blog -> Site A -> Follow link to site B -> Register on site B
- Google search -> Site A -> Follow link to site B -> Register on site B
I would like to record their origin points as follows:
- "twitter ad X"
- "blog post X"
- "google search keyword X"
I'd like to record this in my database on registration and I'd also like to send the info to Analytics.
My Twitter ads are set up to use
utm_campaign on inbound links.
So what's the best way to record where users came from, in order to say "X% of paying customers came from Twitter ads, X% from blog post X, X% from blog post Y, X% from organic search"?
One idea: I could keep the referrer in a cookie, and pass it as a custom dimension to Analytics and also into the database when the user registers? This would also handle the problem of users navigating away from the site and then registering at a later date.
I know Analytics provides utm_source parameters, but how can I ensure that these are tracked between site A and site B? The user may click several pages on site A before going to site B.