Closed
Bug 941666
Opened 11 years ago
Closed 10 years ago
Add region tracking to Google analytics
Categories
(Marketplace Graveyard :: Statistics, defect, P2)
Tracking
(Not tracked)
RESOLVED
FIXED
2014-01-21
People
(Reporter: robhudson, Assigned: spasovski)
References
Details
(Whiteboard: [qa-][feature])
We're switching from our own internal installs tracking to google analytics (bug 938897) but we'd like to track installs within regions. I'm told we aren't tracking region currently. Can we include this as a custom variable that we then can use in app install reports for the custom event of "Successful app install"?
Comment 1•11 years ago
|
||
I'll look into it.
Comment 2•11 years ago
|
||
Right now there's three places where we set the region, but it's not a great plan to import tracking in all of those places. Instead, I'm going to create a setup where you can fire tracking events and set variables: z.win.trigger('track', ['user_var', 'region', region]);
Comment 3•11 years ago
|
||
Blocked on bug 943539 since that's going to change the way we determine your region.
Depends on: 943539
Comment 4•11 years ago
|
||
Scrapping my idea from comment #2. Instead, we're going to fire an event ('regionchange'?) when the region might have changed. That can keep track of whether the region now reflects a different value (it might not if we're not relying on a region fallback, like the SIM card). From there, we can post directly to tracking.
Comment 6•11 years ago
|
||
Davor: I'll let you implement this however you want. The simplest way, IMO: - Set up a z.window.on('regionChange') event in user_helpers that talks to the tracking module - z.trigger('regionChange', [...]) from mobilenetwork.js in detectNetwork - You can either fire the event in user_helpers or just call the method directly if you put the tracking code in there. user_helpers is where the geoip region gets set. What I explicitly wouldn't do is just say `tracking.setVar('region', user_helpers.region())`. If you're doing that on initialization, there's a small chance that you'll have saved the region before yule log posts the SIM card data to mobilenetwork.js and a 100% chance that the client won't have an updated geoip region.
Assignee | ||
Comment 7•11 years ago
|
||
Awesome advice for the fireplace side of things. If we set a region in mobilenetwork.js would that be all that's required from GA's perspective? Does it start a tracking session where installs are now aware of the region? Not sure if you're the right person to ask.
Comment 8•11 years ago
|
||
setVar should set a tracking variable that lasts the duration of the session. In contrast, setPageVar (which has the same function prototype) sets a tracking variable that lasts the lifetime of the current page. Note that both also handle the case of UA, where they set dimensions rather than variables.
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → dspasovski
Priority: -- → P2
Target Milestone: --- → 2014-01-14
Assignee | ||
Updated•10 years ago
|
Whiteboard: [qa-]
Assignee | ||
Comment 9•10 years ago
|
||
https://github.com/mozilla/fireplace/commit/ce72960
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: 2014-01-14 → 2014-01-21
Updated•10 years ago
|
Whiteboard: [qa-] → [qa-][feature]
You need to log in
before you can comment on or make changes to this bug.
Description
•