Despite a number of posts on this specific subject already existing - with decent answers - I am still not quite 100% on the actual method to achieve this simple aim:
- track identified website visitors
For those not in the know already, and in stark contrast to most other Marketing Automation platforms, Marketing Cloud provides a website tracking code that by default only tracks visitors anonymously.
Tracking identified website visitors is absolutely essential and this is an area Marketing Cloud needs to do better on, as there is no technical reason for this gap.
I believe there should be a standard, out of the box solution that anyone can use provided the following scenario, which covers the majority of new Marketing Cloud clients.
- Using Sales Cloud as source of truth
- Using the Sales Cloud record ID as the Subscriber Key in Marketing Cloud
The provided, anonymous tracking code is shown below:
<script type="text/javascript" src="http://123456789.collect.igodigital.com/collect.js"></script>
<script type="text/javascript">
_etmc.push(["setOrgId", "123456789"]);
_etmc.push(["trackPageView"]);
</script>
The documentation specifies to add the following line to identify the visitor:
_etmc.push(["setUserInfo", {"email": "INSERT_EMAIL_OR_UNIQUE_ID"}]);
My understanding is that links from Marketing Cloud emails should include the subscriber key - so this is one method we can identify the visitor if they're incoming from an email link. My question is - what is the exact line of code we need to achieve this?
If I had to take a stab at it this is what I'd come up with:
_etmc.push(["setUserInfo", {"subscriberid": "%%subscriberid%%"}]);
Can someone please provide the correct form for this please?
The other time we can convert an anonymous website visitor to a known website visitor is form completion. Again other Marketing Automation platforms provide this out of the box but Marketing Cloud does not. However this does appear more challenging in the common scenario in that we don't necessarily have a unique identifier (subscriber key) at the time of the form submission as we need to lookup to Sales Cloud, match to an existing Lead/Contact/Person Account, or create a new Lead/Contact/Person Account - at which time we do have a Subscriber Key which we should be able to use to convert an anonymous website visitor into a tracked website visitor. If anyone has a solution to this please do let me know!
Lastly - the point of tracking a Lead/Contact's website activity is to then know more about them or trigger events based on actions. So we want to make this website tracking visible on the Lead/Contact, and also use it in, for example, Journey Builder. Please share your success in achieving any of these aims!
Please do point out anything I've got wrong - more than happy to be corrected - and thanks for your help and input as always!
Kind Regards
Matt