Skip to content

not working if google-tag-manager initialized before via script #147

@Stas-Buzunko

Description

@Stas-Buzunko

I've developed a separate widget that can be installed on clients website.
And issue appears if clients have their google-tag-manager initialised already via script with the same containerId

Here is an example


const analytics = Analytics({
	app: 'vr-crm',
	plugins: [
		googleTagManager({
			containerId
		})
	]
})

And use it like this

analytics.track(
  'dayClickEvent',
  {
	  value: dayStr
  },
  () => console.log('analytics called dayClickEvent on ', dayStr)
)

And it outputs callback but never fires the event.
So i have 2 questions:
1st - is this expected behaviour?
2nd - is there any way to use already initialised google-tag-manager in Analytics?

And it works fine when i remove google-tag-manager <script> from my website

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions