5.4K members online now
5.4K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
Guide Me

Setting the tracking id after tracking pages

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭



I am working on an device that requires setup with a smartphone before it knows what to do, but I would like to track the process of the setup leading up to the point where I can actually track with analytics.  According to the analytics docs you can directly access the tracking id and change whats stored but there is no information on the side effects of this. I know i could just implement it and try to test this functionality every time I update my SDK, but I want to know if there is info on whether or not this is supported as a feature.


The flow I'm looking for is:

1) Setup google analytics without a tracking id (or with a dummy tracking id)

2-1) Connect to smartphone and receive instructions (e.g. use the production server, use the development server, use my local build server). I want to have dynamic endpoint control which the smartphone will instruct.

2-2) While doing 2-1 track the back and forth between smartphone and device but do not try to send any analytics data

3) When smartphone communication is complete and wifi is setup, send analytics data to the tracking id corresponding to the app version I want to track (production/development/local)

Maybe I'm just trying to do something that isn't supported, but I figured I'd ask.

What I'm trying to avoid is the setup process being logged on a development (default) tracking id, and then when the smartphone tells the device that it needs to communicate as a production device it logs communication from that point to the other tracking id (or vice versa)

1 Expert replyverified_user

Re: Setting the tracking id after tracking pages

Rising Star
# 2
Rising Star
Hi Zech,

I'm not a developer. That said, you should be able to log this then use logic to parse the data and send to the appropriate GA UA ID via the measurement protocol (which is what the SDK uses). As long as the GA hit happens within 4 hours you should be fine.

More here:


Theo Bennett
Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn