CONVIO.referrer breaking my JS

Options

I'm having trouble getting CONVIO.referrer to work for me- it seems to be breaking the containing JS.  Does anyone know whether or not CONVIO.referrer should be available throughout the page, or if there's a specific place where it gets defined?

I'm working on getting Google Analytics to properly track referrers.

I have a site hosted outside Convio (http://www.sfaf.org), and a donation form on Convio (https://actnow.tofighthiv.org/site/Donation2?1400.donation=form1&df_id=1400).

Currently, GA shows my referrer as the main site for almost all my donation traffic (this seems unlikely to me). I found the Convio help article indicating that I need to force the GA referrer override to be CONVIO.referrer. However, when I add that to my JS codeblock, whatever 'script' tag it's in seems to no longer function.

The below is a simplified example that I created in the course of debugging. You can see the live code at the above URLs. The code is at the beginning of the BODY tag, immediately after a couple of other script tags. I can't tell from looking at all the JS sources where exactly the CONVIO object gets created/defined, so I can't tell if the problem is with the placement of my reference to it...

CODE:

with this code:

<script type="text/javascript">// <!]></script>

I get this HTML out:

<script type="text/javascript">// <!]></script><script src="https://ssl.google-analytics.com/ga.js" type="text/javascript"></script><!-- GAGAGA ... -->

document.write(unescape("%3Cscript

Which has the output from the document.write immediately after the script tag that had it.

However, when I put a reference to CONVIO.referrer into that same exact document.write call:

unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E%3C!-- GAGAGA .." + CONVIO.referrer +".. --%3E"));

I don't get the output from the document.write showing in the HTML at all.

Tagged:

Comments

  • Hey Alex,

    CONVIO.referrer is only set in Convio CMS (where it is needed because of the way CMS syncs sessions with Convio Online Marketing). You shouldn't need to override the referrer in the same manner in COM.

  • Noah Cooper:

    Hey Alex,

    CONVIO.referrer is only set in Convio CMS (where it is needed because of the way CMS syncs sessions with Convio Online Marketing). You shouldn't need to override the referrer in the same manner in COM.

    Thanks for chiming in, Noah, that would explain it.

Categories