Analytics
2K members online now
2K 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
star_border
Reply

auto linking with forms not working

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I have GA init code running in the page head tag:

 

ga('linker:autoLink', ['destination.com'], true, true);

The page contains one form with action="destination.com" in the body tag and a submit button. But when we click the submit button the _ga autolinking param is not getting added to the action url. Is this because I am instantiating the GA code in the head tag and it doesn't have the form element available by then? But by that logic <a> tag linking also should not work but that is working fine.

 

Any help is appreciated.

 

Thanks. 

Re: auto linking with forms not working

Explorer ✭ ✭ ☆
# 2
Explorer ✭ ✭ ☆
What is the method that you use for linking? That is - how does your link look like?

Re: auto linking with forms not working

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
I am not using any other method for linking. As per my understanding, following ga code should add the _ga param to the form with action="destination.com" on submit of the form:

ga('linker:autoLink', ['destination.com'], true, true);

Re: auto linking with forms not working

Explorer ✭ ✭ ☆
# 4
Explorer ✭ ✭ ☆
It would really help if you could paste here an exemplary link as it appears in your form code.

Re: auto linking with forms not working

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
This thread is a little stale but I am having the same problem. Any luck finding a solution?