I'm a front end developer looking to set up google analytics. In my naivety I though analytics was simply achieved by dropping a GA tag such as the below code onto all my pages however this doesn't appear to be the case. <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXXX-X"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-XXXXXXXXX-X'); </script> Code (JavaScript): I'm looking to track the following: Where a user has come from to my site organic / paid If possible what google ads campaign they came from (or social media campaigns) The user journey on the site The journey on our site after a form has been submitted The added complication is that all our forms are hosted externally not on our website and hosting them our self isn't currently an option. So the user journey would essential be: User is referred to our site from a source > User browses site > User clicks a CTA > User is redirected to mysitename.thirdparty.com > user is redirected back to our site on form submit > user journey continues. Is it possible to track this journey? Is Google analytics the right tool and does anyone have any useful resources they can point me to? Does an idiots guide to achieve the above exist? Any help is much appreciated.
Yes you can, you need to add UTM tracking on the URL. check this for refference https://www.crazyegg.com/blog/utm-codes-guide-with-examples/