If you have questions about using mojoPortal, you can post them here.
You may want to first review our site administration documentation to see if your question is answered there.
Hi,
I've got Form Wizard Pro on my site. I'm using it to request some info from my users prior to letting them download our software. The thank you page consists of a set of links to the various downloads for our products.
I'm trying to add a script to the thank you page which attaches google analytics events to the links. This lets us see which products were downloaded from that page in our analytics account.
For example, within the html of the thank you message, I have a script like the following:
<script>
$(document).ready(function () {
$(".my-product a").click(function () {
_gaq.push(['_trackEvent', 'file', 'zip', 'my product']);
});
</script>
I've used this approach on other pages within mojoportal with success. However, the google analytics chrome debugger tool shows me that when the thank you page is displayed, the above javascript isn't executed and nothing happens when I click a download link.
My guess is this has to do with the fact that the formwizard appears to use some form of ajax to load the thank you page html, rather than actually load a new page. Since I figured the $(document).ready() callback may not be executed in that case, I tried the same code just without the $(document).ready(), but no dice.
Is there a way I could get this javascript to work on the thank you page?
Instead of wiring up the tracking after the fact, try just put the tracking right in the onclick on the download link similar to the scenario for outbound link click tracking.
Hope that helps,
Joe
Sorry I missed that in the docs, thanks, works great!