Closed reslear closed 7 months ago
multiple trackingIds in config:
id: string | string[] - (id) => [].contact(id).foreach((_id) => gtag('config', _id))
id: string | string[]
(id) => [].contact(id).foreach((_id) => gtag('config', _id))
and add sugar method for runtime - configureTrack.
configureTrack
https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-google-gtag/src/gatsby-ssr.js#L65
also maybe need add sugar method to get clientId and prevent duplications https://www.analyticsmania.com/post/get-google-analytics-client-id/
Good idea. Should be pretty straight forward to implement. PR welcome! 🙂
also good implementation https://github.com/facebook/docusaurus/blob/7dcad0c6322c87131f9f39cbc4e765b0e1119fe8/packages/docusaurus-plugin-google-gtag/src/index.ts
+1
Describe the feature
multiple trackingIds in config:
id: string | string[]
-(id) => [].contact(id).foreach((_id) => gtag('config', _id))
and add sugar method for runtime -
configureTrack
.https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-google-gtag/src/gatsby-ssr.js#L65
also maybe need add sugar method to get clientId and prevent duplications https://www.analyticsmania.com/post/get-google-analytics-client-id/
Additional information
Final checks