Google Tag Manager and Widget

(vse-taxi.com) #1

Okay, so i can’t make widget on my site work through Google Tag Manager

- here’s how it’s added to Google tag manager

here’s error i’m seeing:
Uncaught Error: Script was not added correctly. Ensure the script contains data under the data-fxo-widget attribute.
at Object. (embed.js:13)
at t (bootstrap df8f5ba5d1dfc2aaed44:19)
at Object. (embed.js:2136)
at t (bootstrap df8f5ba5d1dfc2aaed44:19)
at bootstrap df8f5ba5d1dfc2aaed44:65
at bootstrap df8f5ba5d1dfc2aaed44:65

page is here http://vse-taxi.com/news-post-57-1-kak-zakazat-taksi-v-aeroport-v-sankt-peterburge.aspx

can anybody suggest any help?

(Daniel Beckett) #2

@vse-taxi.com

I’m honestly not overly familiar with Google Tag Manager so I can’t be certain of how it handles the custom HTML or scripts but when setting up a test page you would need to specify <meta charset="UTF-8">. You could try adding that in.

For reference, a very basic page would look like this:

<HTML>

<HEAD>
 <meta charset="UTF-8">
<TITLE>Test</TITLE>

</HEAD>

<BODY BGCOLOR="FFFFFF">
<H1> Widget Test </H1>

<script src="https://widget.flowxo.com/embed.js" data-fxo-widget="abc123=" async defer></script>
</BODY>

</HTML>
(vse-taxi.com) #3

i have that meta tag on my page

(vse-taxi.com) #4

if i manually add script - it’s working. but i preffer adding scripts through gtm as it’s more flexible

(Daniel Beckett) #5

@vse-taxi.com

Just a quick check, do you have ‘Allow writes’ enabled so the script can write to the page?

Thanks,
Dan

1 Like
(vse-taxi.com) #6

Daniel, yes - this is what resolved the problem. thank you

2 Likes
(Matías Verges) #7

The problem you were having is that Google Tag Manager clears the scripts tag, removing the ‘data-fxo-widget’ attribute.