Comments (7)
It might have todo something with this line
https://github.com/gtm-support/core/blob/77396850357034cc9a5b0401129cb91f74754289/src/utils.ts#L100
We might need to add a test case and see how it behaves
Not sure when I will have time for that, if it's possible for you feel free to open a PR to speed up the process
from vue-gtm.
Just looked at the code, shouldn't this be a problem on local if this were the case? It doesn't return this error locally.
from vue-gtm.
from vue-gtm.
No I assume that's it, your options looks valid to me.
So if it's not the URLSearchParams
that weirdly transforms an array of ids, then the issue is not in this plugin but in a configuration of your minifier as you said.
from vue-gtm.
@Shinigami92, I've confirmed that the minifier does not impact the array of ids. It appears the URLSearchParams
might be the issue. Could we pretty please get a fix for this sooner than later?
from vue-gtm.
Please note that I have a full-time job, several other OpenSource projects (like @prettier/plugin-pug and faker), managing also stuff in Vite and faker and then also want to have time for myself
So I cannot guarantee a fix sooner than later
The MIT license implies that
Lines 16 to 22 in a481e3f
from vue-gtm.
@sadelokiki There is something weird going on here 🤔
When providing id
with an array, the tool generates two separate scripts
So calling it with id: ['GTM-M4X2575', 'GTM-T98TL4V']
should result in something like this:
<script src="https://www.googletagmanager.com/gtm.js?id=GTM-M4X2575"/>
<script src="https://www.googletagmanager.com/gtm.js?id=GTM-T98TL4V"/>
Here you can see for each id in the array loadScript
will be called separately
Lines 70 to 73 in a481e3f
To explicitly test this behavior, I added a test to ensure that this is done correctly and the tests are passing: https://github.com/gtm-support/core/blob/402056006888b1d089b72ab621bccd526a99be55/tests/gtm-support.test.ts#L172-L186
from vue-gtm.
Related Issues (20)
- How to add content_group
- Bug: Plugin is not working with stream ID HOT 1
- Error : You may need an appropriate loader to handle this file type HOT 5
- Bug: last custom property is persisted HOT 2
- Using in Nuxt 3 project. `page_view` works, but `trackEvent` doesn't HOT 5
- Bug: My GTM tag starts with G instead of GTM HOT 1
- How to properly access `cid` value ? HOT 1
- Bug: cannot install with vue@^3.2.0 HOT 4
- Bug: nonce config does not output nonce to script tag HOT 10
- Bug: Can you please update to allow Google IDs to begin with G- HOT 1
- SSR support?
- Google Tag Manager tag is not firing when viewing the page; we have to reload the pageBug: HOT 3
- Add ability to load local gtm.js HOT 1
- Bug: Module pushes events to the datalayer that are empty with the name "interaction"
- Bug: The GTM Tag ID shows as "G-XXXXXXX", "UA-XXXXXX" or "AW-XXXXXXX" not GTM-XXXXXX HOT 2
- PartyTown support HOT 1
- Bug: router can not be passed to the plugin because the corresponding property doesn
- Bug: router can not be passed to the plugin because the corresponding property doesn't exist HOT 2
- Nonce not added as attribute HOT 3
- Problems wit Google consent mode v2 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-gtm.