MatteoGabriele / vue-gtag

Global Site Tag plugin for Vue (gtag.js)

Home Page:https://matteo-gabriele.gitbook.io/vue-gtag/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Send user properties with Typescript

spiralis06 opened this issue · comments

Description

I need to send user properties so that i can create separate audiences on Google Analytics Dashboard.

Expected behavior

Trying to send user_properties, using Typescript :

this.$gtag.set("user_properties": {"foo":"bar"}})

Actual behavior

Typescript function definitions does not allow to use "user_properties" : {"foo":"bar"} as argument

Environment

Run this command in the project folder and fill in their results:

npm ls vue-gtag: vue-gtag@1.16.1

Then, specify:

  1. Operating system: MacOs
  2. Browser and version: Chrome Version 97.0.4692.71

Is there a way/workaround to override Typescript function definition so that i can use this crucial feature ?

Thanks

Yeah, I'm sorry about that. Contributors have always done the typescript part: I have zero experience with typescript, and I don't like it. I am probably going to remove the file so someone can maybe create the type definition outside this repository.