How to share URL with UTM parameters on WhatsApp

3.4k Views Asked by At

I have given an option to my users to share my website on whatsapp. And I want to know how many users land back on the website using the shared link. Hence, the shared button opens this link:

https://wa.me/919876543210?text=https://www.mywebsite.com?utm_source=whatsapp&utm_medium=share

But this URL considers the end &utm_medium=share as a part of the wa.me URL, and shares only https://www.mywebsite.com?utm_source=whatsapp on WhatsApp. So instead I did this:

https://wa.me/919876543210?text=https://www.mywebsite.com?utm_source=whatsapp%26utm_medium=share

which shares the correct URL on whatsapp: https://www.mywebsite.com?utm_source=whatsapp%26utm_medium=share, but when I open it, the UTM params are not captured by GA.

What is the way out of this loop?

1

There are 1 best solutions below

1
BNazaruk On

There's a more elegant way of doing it than utm params. Have something like: https://wa.me/919876543210?text=https://www.mywebsite.com?t=wa See how now it's shorter and more elegant to a user? Now you have two good options.

  1. Make a conditional redirect on your site from any url that has a t=we query param to whatever utm param you want with no restriction.

  2. And even more elegantly: use GTM to parse pageviews where there's a t query parameter set, then make a neat lookup table where the input would be the value of t and the output - whatever you want to name it. Then use that lookup table's value to set your session-level custom dimension in pageviews.

Why a custom dimension and not UTM? Because when using UTMs, you're affecting your attribution. And sessions. You can easily override organic or paid attribution with some meaningless whatsapp attribution. Well, yes, if you don't use attribution at all and you don't care about GA session breakpoints, then sure, UTMs are just easier.

Also, try escaping the &, but not much hope there.