Cross Domain Auto Linking for Forms with Anchor Parameter

139 views
Skip to first unread message

EstudianteGA

unread,
Oct 19, 2015, 10:53:41 AM10/19/15
to google-analytics-analyticsjs
Hello,

I set the following tag for cross domain auto linking with anchor parameter.

<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-6-1', 'auto', {'allowLinker': true, 'allowAnchor': true});
ga('require', 'linker');
ga('linker:autoLink', ['example.com', 'example.net'], true, true);
ga('send', 'pageview');
</script>

<form action="http://example.com/" method="post">
<input name="q">
<input type="submit" value="Submit">
</form>

However the form link will be with query parameter like http://example.com/?ga=..., when I clicked the above "Submit" button.

Is there a way to enable cross domain auto linking for forms with "anchor parameter"?

Thanks in advance,

Philip Walton

unread,
Oct 19, 2015, 12:42:37 PM10/19/15
to EstudianteGA, google-analytics-analyticsjs
The `allowAnchor` field has nothing to do with the linker plugin. Please see for allowAnchor reference for a description of its function.

--
You received this message because you are subscribed to the Google Groups "google-analytics-analyticsjs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-ana...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-analytics-analyticsjs/048b6f46-cba6-4ac2-bc43-1b3b5d1a6337%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

EstudianteGA

unread,
Oct 19, 2015, 6:05:54 PM10/19/15
to google-analytics-analyticsjs
Thank you very much for your comment.

I omitted the 'allowAnchor' field but it still doesn't work. 

2015年10月20日火曜日 1時42分37秒 UTC+9 Philip Walton:
Reply all
Reply to author
Forward
0 new messages