On our site we were having issues with the cross sub-domain tracking not working. It appeared to be with choosing single quote on some sites and double on another. The GA site recommends single quotes, but the module, by default, uses double.

So I wanted to change this to allow for us to use it as recommended, fixing our bugs. I have done this by adding an admin radio button to allow the user to choose a quote type (defaults to double, as that was what was previously used).

I have attached 2 patch files, it would be great to hear everyones thoughts, and whether these have been done in a standard way. I used svn diff to create the files.

Comments

hass’s picture

Status: Active » Closed (works as designed)

No idea what you are doing wrong, but there is no need to change at all.

guysaban’s picture

We had a similar recommendation from Google to change the quotes - they said it was not implemented correctly.

In Google Analytics AdWords campaigns stemming from a secondary account are being tracked as:
(not set)
According to Google Support it's because the Google tracking snippet (as implemented by Drupal) in the Google Analytics module is using double quotes instead of single quotes:
"
instead of:
'

All the best,
Guy

hass’s picture

Some people have their brain turned off.

guysaban’s picture

Hi Hass,

I understand what you are saying. It does not make sense, but Google support is saying something else.

I am going to try the code change from double to single quotes and see if the analytics issue is resolved.

All the best,
Guy

guysaban’s picture

Google support went back on what they earlier said, and apparently the double/single quotes issue has nothing to do with the problem we were dealing with.

Issue was related to a data streaming configuration issue between Google Adwords and Google Analytics.