I have a page with an inputform that is replaced by the thanks-text while the URL is staying the same. Therefore I can’t assign a URL to a conversion goal in Google Analytics. Because I only want to count conversions when the thanks-text has been shown.
In [URL=”http://support.google.com/googleanalytics/bin/answer.py?hl=en&answer=55521″]this Google document
[CODE]pageTracker._trackPageview(“/homepage/link1”);
So that’s very nice: I can create my own thanks-URL! But now my problem.
In a javascript-function I have the following code to fill out a div in the body:
[CODE]document.getElementById(“result”).innerHTML = str;
This is the div in the body
[CODE]<form name=”f1″>
<div id=”result”></div>
</form>
The string ‘str’ is made in another script that checks the validity of the forminput. In that script I know if the forminput is successful or not.
I can add the pageTracker code in the str, but then you get javascript in the innerHTML, which doesn’t work (I read elsewhere).
So how to solve this problem?
Thanks a lot!