Uncaught SyntaxError: Unexpected token >

Avatar

Avatar
Boost 1
Level 1
zachh54251853
Level 1

Likes

2 likes

Total Posts

1 post

Correct reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
zachh54251853
Level 1

Likes

2 likes

Total Posts

1 post

Correct reply

0 solutions
Top badges earned
Boost 1
View profile
zachh54251853
Level 1

13-10-2017

We're seeing the error above on all of our pages that contains "alexa-skills-kit" anywhere in the last part of the URI (after the last / ). Does Adobe Analytics have any special requirements when it comes to the URL? We're not seeing this issue on any other pages, and they all use the same script information. The error is located on the Footer line below.

Header:

    <script src="//assets.adobedtm.com/2c02c31d2aed638ba6c6ca977df6b73f9ff514c3/satelliteLib-38635b7dc936a1789c429e0c77550bc7a78f33af.js"></script>

    <script src="https://assets.adobedtm.com/2c02c31d2aed638ba6c6ca977df6b73f9ff514c3/s-code-contents-373b2dd14221c28..."></script>

Footer: <script type="text/javascript">_satellite.pageBottom();</script>

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Contributor
MVP
joshd7227840
MVP

Likes

275 likes

Total Posts

241 posts

Correct reply

70 solutions
Top badges earned
Contributor
Give Back 10
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Contributor
MVP
joshd7227840
MVP

Likes

275 likes

Total Posts

241 posts

Correct reply

70 solutions
Top badges earned
Contributor
Give Back 10
Give Back 5
Give Back 3
Give Back
View profile
joshd7227840
MVP

18-04-2018

So it's kind of hard to give a definitive answer to this because of the way DTM digests and (dynamically) outputs tags, and this is all I have to go by (vs. being able to see the tag within the DTM interface), but it looks to me like there is a difference in formatting in the prod version vs. staging (unpublished) version of a tag in a rule named ""Amazon Pixel - Alexa" (the last rule to trigger before the error, according to DTM notifications). Namely, looks like there is a loss in line breaks which may be causing issues. My guess is since the line breaks are missing, perhaps there is a comment line (// some comment) that's effectively commenting out parts of the code, being all on one line w/out line breaks.

As a first level of effort, can you try disabling this rule (unpublished) to see if the error goes away?

But overall, I do not see the error in prod mode; only stage mode. So it is something unpublished that's the culprit.

Answers (3)

Answers (3)

Avatar

Avatar
Shape 25
MVP
Andrey_Osadchuk
MVP

Likes

538 likes

Total Posts

973 posts

Correct reply

264 solutions
Top badges earned
Shape 25
Bedrock
Coach
Boost 500
Affirm 250
View profile

Avatar
Shape 25
MVP
Andrey_Osadchuk
MVP

Likes

538 likes

Total Posts

973 posts

Correct reply

264 solutions
Top badges earned
Shape 25
Bedrock
Coach
Boost 500
Affirm 250
View profile
Andrey_Osadchuk
MVP

16-10-2017

Could you share the site URL?

Avatar

Avatar
Contributor
MVP
joshd7227840
MVP

Likes

275 likes

Total Posts

241 posts

Correct reply

70 solutions
Top badges earned
Contributor
Give Back 10
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Contributor
MVP
joshd7227840
MVP

Likes

275 likes

Total Posts

241 posts

Correct reply

70 solutions
Top badges earned
Contributor
Give Back 10
Give Back 5
Give Back 3
Give Back
View profile
joshd7227840
MVP

13-12-2017

This sounds like a problem with a tag or rule implemented through DTM, not the DTM script itself.

My personal guess is you have a page load rule with a condition to trigger on URLs such as that, and you attempted to put some html remarketing tag into a javascript type 3rd party container. 

In any case, you will need to provide more details for what rule(s) trigger on those URLs, or provide an example URL for us to look at.

Avatar

Avatar
Level 1
peterc87726262
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile

Avatar
Level 1
peterc87726262
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile
peterc87726262
Level 1

17-04-2018

Continuing on with this question.

The Uncaught SyntaxError: Unexpected token > seems to be related to a page load rule associated with a tracking pixel to fire on "alexa-skills-kit" URL's.

Link:

https://developer.amazon.com/alexa-skills-kit

Alexa Skills Kit - Build for Voice with Amazon

Opening up the console, that The Uncaught SyntaxError: Unexpected token >  links to the footer code

Footer: <script type="text/javascript">_satellite.pageBottom();</script>

Does placing the footer code more to the bottom of the page address this issue? (see page source code)