File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ export default {
1515 },
1616 methods: {
1717 createMap (token ) {
18+ const self = this
1819 const mapboxgl = require (' mapbox-gl/dist/mapbox-gl' )
1920 mapboxgl .accessToken = token
2021
@@ -118,6 +119,12 @@ export default {
118119 zoom: zoom
119120 })
120121 })
122+
123+ self .$gtag (' event' , ' clustered' , {
124+ eventAction: ' click' ,
125+ eventLabel: ' cluster click' ,
126+ eventValue: clusterId
127+ })
121128 })
122129
123130 map .on (' click' , ' unclustered-point' , function (e ) {
@@ -153,6 +160,12 @@ export default {
153160 </div>
154161 ` )
155162 .addTo (map)
163+
164+ self .$gtag (' event' , ' unclustered' , {
165+ eventAction: ' click' ,
166+ eventLabel: ' unclustered click' ,
167+ eventValue: title
168+ })
156169 })
157170
158171 map .on (' mouseenter' , ' clusters' , _ => map .getCanvas ().style .cursor = ' pointer' )
Original file line number Diff line number Diff line change @@ -75,7 +75,6 @@ module.exports = {
7575 ** GTAG configuration
7676 */
7777 'google-gtag' : {
78- debug : true ,
7978 id : process . env . GA ,
8079 config : {
8180 send_page_view : true
You can’t perform that action at this time.
0 commit comments