Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use package from API #49

Open
matteomigliore opened this issue Dec 15, 2021 · 8 comments
Open

Use package from API #49

matteomigliore opened this issue Dec 15, 2021 · 8 comments

Comments

@matteomigliore
Copy link

Hi,

how is possible to use the package from API in ASP.NET Core?

Is also possible to track a single user passing any ID?

Thank you.

@CrahunGit
Copy link
Collaborator

I suppose you can inject the IAnalytics interface in your controller and use it

@matteomigliore
Copy link
Author

matteomigliore commented Dec 15, 2021 via email

@CrahunGit
Copy link
Collaborator

you can inject IAnalytics GlobalTracking with constructor injection in any class you want and then you can call TrackEvent with the data you need. It's not different from blazor where the @Inject is injected on property on the generated class. You can read further on the readme

@matteomigliore
Copy link
Author

Is possible to use the measurement ID?

And is possible to track single users?

@matteomigliore
Copy link
Author

@CrahunGit should you add tracking of user sessions passing a user ID string?

Like explained here:
https://phppot.com/php/track-individual-logged-in-users-using-google-analytics

Thank you

@CrahunGit
Copy link
Collaborator

Well. It does not seem hard at first but It takes few steps on the google manager before it before you can log user’s actions.

As you can read this is working on google analytics but not in ga.

On the blazor side its just a matter of calling the apropiated Javascript. Nothing else.

We need time to see if it can be done right now or it needs some design first.

@matteomigliore
Copy link
Author

Great, thank you. Should be really appreciated.

P.S.
I'm near Alicante too.

@CrahunGit
Copy link
Collaborator

We’re neighbors. All Spanish developers trying its best writing bad English. Awesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants