Checkout JS syntax error

Solved
Highlighted
Tourist
5 0 2

I've been asked to look at an error appearing on the checkout and thank you pages of a Shopify store and I'm struggling to figure out a fix.

 

There is a JS variable which is defined incorrectly (it has HTML encoded quote marks around the value part of the declaration):

 

Shopify.clientAttributesCollectionEventName = "client_attributes_checkout";

checkout-js-error.JPG

 

I've been unable to find anything in relation to this issue in the theme code or on Google.

 

Can anybody offer some advice?

 

Thanks

2 Likes
Highlighted
Shopify Partner
10 0 4

Was that code added to the "Additional scripts", on the Settings?

https://help.shopify.com/en/manual/orders/status-tracking/customize-order-status/add-conversion-trac...

 

 

If my answer was helpful then please Like and Accept Solution :)
0 Likes
Highlighted
New Member
1 0 0

I'm experiencing the same issue as well. No additional scripts code.

0 Likes
Tourist
3 1 0

Same issue here - any ideas?

0 Likes
Highlighted
Tourist
5 0 2

Hi marcoswatanabe,

 

I have code in the additional scripts section but it doesn't contain the encoded JS declaration causing this issue.

Also, I've found the issue on the checkout page, the additional scripts don't seem to be loaded on the checkout page.

 

Thank you for your help though, any other ideas?

0 Likes
Highlighted
Tourist
5 0 2

Hi dariothornhill and sh0pify-user,

 

If you don't mind me asking, what Apps do you have on your stores?

 

I have:

ChannelAdvisor by ChannelAdvisor

Google Shopping by Shopify

Mailchimp for Shopify by Mailchimp

Shopify Theme Updater by Out of the Sandbox

 

It might be one of these causing the problem but I'm unable to identify where the offending code is coming from. If we can identify a common App, it would be a good starting point.

 

Thanks

0 Likes
Highlighted
New Member
1 0 0

Hi NB82,

I'm facing the same issue and I don't have any of those apps on my store.

0 Likes
Highlighted
New Member
2 0 1

I have this error too, when previewing the new checkout. Could be related?

1 Like
Highlighted
New Member
2 0 1

The same code appears to be present when not previewing the new checkout, but is correctly not escaped, so the error doesn't present itself in the old checkout for me.

 

<script type="text/javascript">
  Shopify.clientAttributesCollectionEventName =
    "client_attributes_checkout";
  var DF_CHECKOUT_TOKEN =...
0 Likes
Highlighted
Shopify Expert
112 0 23

Same issue here. I need to know where this error is coming from!

0 Likes