Analytics
1.5K members online now
1.5K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Where Does the GA access the Affiliation Code from My Website?

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I've revamped my website via Weebly and when I've run it through the Chrome Developer Console console, it's showing a syntax error with this string of code, which I think relates to the e-commerce tracking

 

gaAffiliation = 'My Store Name'; (Edited for security)

For some reason the name of my website includes an apostrophe which seems to be breaking the code string.

 

I have changed the name of my site in Weebly to remove it, but with no effect.

 

Obviously, this is rendering my e-commerce tracking obsolete.  Weebly have been really unhelpful and just said to re-import the GA tracking code, which I've done.

 

The issue seems to be where GA is picking up the name from, but I don't know where I need to look, or where I need to tell Weebly to look to get them to help me!

 

I'd really appreciate any suggestions as I have hunted high and low to try and find out where to look and this is my last option.

1 Expert replyverified_user

Re: Where Does the GA access the Affiliation Code from My Website?

[ Edited ]
Top Contributor
# 2
Top Contributor

Hi Sophie,

That's hard to tell from outside. The apostrophe is definitely breaking things here. Essentially, you just need to publish the changed information in your system. To 're-import' it if that's the term in your system ...

You may try Google Tag Assistant Recordings [1] to check along your shopping-cart funnel if the new name is already being transferred correctly to Analytics.

Christoph

[1] https://support.google.com/analytics/answer/6280771?hl=en

Re: Where Does the GA access the Affiliation Code from My Website?

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Thanks so much for your reply Christophe

I have already republished the site multiple times since I removed the apostrophe from the title due to other content changes.

I also tried running the recording as suggested- I had already set up the Tag Assistant, but hadn't tried recording activity as I didn't understand the significance of that. This is all brand new to me!

It's showing that a new session when I click the cart option...which I suppose indicates that GA isn't seeing the cart as an integral part of my site; which makes sense if the affiliation code is broken. This was the error message for that got recorded "This hit starts a new session, most likely because the client ID changed"

Thanks again. I think I'm going to have to go back to Weebly...which may be like banging my head against a brick wall! ;o)

Re: Where Does the GA access the Affiliation Code from My Website?

Top Contributor
# 4
Top Contributor
Just to get sure - you should definitely check with tag assistant if your affiliation code is still broken or not. So, to clarify if it's publish issue or an Analytics issue.

Regarding the error message: changing client ID usually shows up when there is a domain change when you go from your main site to your shopping cart section of your site. If so, usually you have to apply cross-domain tracking.

Christoph

Re: Where Does the GA access the Affiliation Code from My Website?

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
I'm not sure where I'm looking for that in the Tag Assistant, sorry.

BUT, when I look at my GA it is saying that e-commerce tracking isn't working due to an affiliation and a product issue...which seems to link to the apostrophe issue and potentially the shop domain issue.

However, there shouldn't be a domain issue with the shop cart as Weebly say that you can just add the GA tracking code in your site and activate e-commerce settings in GA to allow the tracking to work...but then they have said a lot of things that don't work as they say they should!

Thanks again for the extra info...I'll look into it at this end so that I can at least be a bit prepared if they do suggest it.