Showing original link being cloaked in Google Analytics

241 Views Asked by At

I use a cloaking plugin for my WooCommerce external link products. Because the external links are cloaked it shows the cloaking link in GA. Is there any possible way to show the original uncloaked link in GA even though it is being cloaked? Thanks

1

There are 1 best solutions below

5
On

You'd likely want to get the uncloaked link and load it to your dataLayer. You can then push it from the dataLayer to a custom dimension in your GA. A custom event, such as an external link click could include this custom dimension. This would provide you with the join between the outgoing click (the cloaked link) and the original link. This is easily doable with Google Tag Manager or a few lines of event code.