Adobe Analytics Setting Custom Visitor ID

A custom Visitor ID can be used on sites where you have unique way to identify visitors. A custom method implemented to identify visitors by setting the s.visitorID variable which can be up to 100 alpha-numeric characters and must NOT contain a hyphen.

There are some benefits to setting the custom visitor id. The main benefit is that you are 100% in control of how visit(or)s are tracked. Another good reason to do this is if you already have a visitor id infrastructure in place on your site, setting Adobe Analytics’s visitor id to what you already have can potentially make it easier to tie data to or cross-reference data between Adobe Analytics and other places that utilize that visitor id.

Sidenote: It is possible to get the visitor ids from Adobe from various places (e.g. Data Warehouse, Data Workbench, using the Adobe API), but currently there is no report in Adobe Analytics itself to see the visitor id, even if you set it yourself. To get around this, you can also assign it to a prop and/or eVar, which is visible in Adobe Analytics reports. But this is not possible with the 3rd party cookie tracking (because javascript cannot read 3rd party cookies), so that is another benefit to setting it yourself.

Beyond that, IMO there are basically no benefits to setting it yourself. On the other hand, some warnings should be raised

Setting a value in visitorID or vid or equivalent does NOT cause Adobe Analytics to update the visitor id in its cookie. Adobe Analytics continues to generate/output the visitor id in the cookie and then on Adobe Analytics server, and it simply overwrites that value with your visitor id for that hit (on the backend, on the collection server). But it does NOT update the cookie with your new visitor id.

The implication here is that if you want to set the custom visitor id, you are essentially putting the responsibility on yourself to keep track of the visitor. So, you must have your own infrastructure in place that not only generates the id, but preserves it and ties it to the visitor, so that it can be output on every page the visitor views – including if the visitor navigates between multiple domains your tracking code is implemented on (if applicable).

If you do not do this, then the visit(or) will break and count as a new visit(or) going from page to page, or when the visitor hop from domain A to domain B. How often the break actually occurs is directly tied to how often you are actually outputting the visitor id yourself (with a correct value). For example if you only set it on first hit, and then on never set it, the visit(or) will break once, because from 2nd hit + Adobe Analytics will just default to using its own generated visitor id.

To put this into perspective, make sure you are absolutely confident about your methods for generating and keeping track of visitor id values before doing this.

Firstly, to be clear about the link you posted, those are examples of how the visitor id can be set depending on your implementation. Adobe offers several ways to record data, and the javascript method is just one way. The examples on that page show what you’d set for some of the other ways (including the js way).

The point here is that not all of those methods may be relevant to you, depending on your implementation. For example, if you are only implementing Adobe Analytics with javascript (whether it be the core s_code.js or through DTM or w/e), the only one relevant to you is s.visitorID.

So for example, yes, you can use s.visitorID to override Adobe Analytics’s default visitor id generation, for javascript implementation. If you set that variable, you will see the vid param show up in the request to Adobe Analytics (look at the request sent to the Adobe Analytics collection server with a packet sniffer, or with browser addon or dev tools net/traffic tab).

The reason vid was mentioned on that link is because that is what you’d use if you are manually building the request URL to Adobe Analytics. For example, if you don’t want to use the javascript implementation, and instead want to use server-side logic to build and output an image tag yourelf, or send data to Omniture directly from your server (e.g. cURL), the vid param is what you’d set for the visitor id.

Sidenote: hardcoding your own image request is kind of a throwback for mobile device tracking in earlier times when mobile devices did not consistently or fully support javascript. Pretty much all modern mobile devices these days fully support javascript, and on top of that, Adobe has done a lot of work over time streamlining the core Adobe Analytics library to be leaner and more efficient whether viewing on desktop or mobile browser (make sure you are using the latest version of AppMeasurement library).

So IOW if you are using the javascript library, you don’t need to worry about the vid param, because the js library already does it. Although for QA purposes, you can check that it is there with your value on a given request.

As far as “how” to set it.. assuming you’re implementing it with javascript: you set it like any other Adobe Analytics variable. Somewhere between the Adobe Analytics library loading and the s.t or s.tl trigger, you assign a value to it, e.g.

Where specifically you set it, depends on how you have implemented Adobe Analytics. For example, if you have implemented Adobe Analytics through DTM, and you have your custom visitor id exposed on your page before the DTM library is loaded (e.g. some data layer property, or in a cookie), you can create a data element that grabs that value, and then in the Adobe Analytics > Tool Config > Cookie > Visitor ID field, you can specify your data element, and DTM will set it for you (but you are still responsible for making sure whatever source the data element draws from is there)

And again, note that even if you set it, you will still see Adobe Analytics’s default generated id in their cookie and request urls. The override happens on Adobe Analytics’s collection server, which you do not have visibility into. To verify that Adobe Analytics is actually using your custom value, you will need to export it from Adobe Analytics (e.g.with a data warehouse export).

Leave a Reply

Your email address will not be published. Required fields are marked *

CAPTCHA