Mobile app version of vmapp.org
Login or Join
Hamaas447

: Google Analytics: recording successful conversion from website ABC.com to XYZ.com Our website ABC.com lists many events and each event listing has a registration button that links to an externally

@Hamaas447

Posted in: #GoogleAnalytics

Our website ABC.com lists many events and each event listing has a registration button that links to an externally hosted form on XYZ.com. XYZ.com is controlled by a vendor. Each form (e.g. xyz.com/event01.html) does not have a separate thank you HTML, instead JavaScript is used to display a "Thank you" message within the same page.

What is the best approach to record a successful conversion from our website ABC.com through to xyz.com/event01.html?

I can not find any documentation on this.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Hamaas447

1 Comments

Sorted by latest first Latest Oldest Best

 

@Gloria169

Assuming that "controlled by a vendor" means you don't have access to the code on XYZ.com, then the best you can do is track the button clicks to XYZ.com as outbound links with events.

As indicated here, outbound links are not automatically tracked by Google Analytics, so you'd need to manually tag them using JavaScript, which will then allow you see them as one of the event categories:


Because links that lead away from your site are not automatically tracked by Google Analytics, you will need to manually tag all outbound links you want to track. To do this, you will add some custom JavaScript that uses the _trackEvent method to record these links and then modify the links you want to track.

With this structure in place, you could then see Outbound Links as one of the event categories and drill down to see which particular outbound links are the most popular.


The steps for tracking button clicks as outbound links covered in the example here (edited for your needs) are:


Delay the outbound click by a fraction of a second (to provide the browser more time load the tracking code) by adding this JavaScript before your </head> tag:

<script type="text/javascript">
function trackOutboundLink(link, category, action) {

try {
_gaq.push(['_trackEvent', category , action]);
} catch(err){}

setTimeout(function() {
document.location.href = link;
}, 100);
}
</script>

Then you can log each button click by adding an onClick event to trigger the trackOutboundLink function above:

<button onClick="trackOutboundLink('http://xyz.com/event01.html', 'Outbound Links',
'xyz.com'); return false;">Click me</button>



As specified there:


The example above uses the category label Outbound Links. This is a
useful way to categorize all outbound links in the Event Tracking
reports. It sets the specific name of the website as the second
parameter in the call.


So change xyz.com above to whatever external site you want to attribute the button click to.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme