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

Update Google Analytics custom event sending #4503

Open
marcduiker opened this issue Jan 24, 2025 · 0 comments
Open

Update Google Analytics custom event sending #4503

marcduiker opened this issue Jan 24, 2025 · 0 comments
Assignees

Comments

@marcduiker
Copy link
Contributor

Describe the bug
Currently the docs site uses this notation for sending custom events:

ga('send', 'event', 'Tabs', 'Clicked', 'How-To: Save and get state - tabs-3-go')`

Example:

<a onclick="ga('send', 'event', 'Tabs', 'Clicked', 'How-To: Save and get state - tabs-3-go');" class="nav-link" id="tabs-3-go-tab" data-toggle="tab" href="#tabs-3-go" role="tab" aria-controls="tabs-3-go" aria-selected="false">Go
  </a>

This notation is deprecated and needs to be replaced with:

gtag('event', '<event_name>', {
  <event_parameters>
});

More info here

Steps to reproduce

  1. Go to any page with (tab)links: such as https://docs.dapr.io/developing-applications/building-blocks/state-management/howto-get-save-state/.
  2. Click on one of the language tabs: Java
  3. There will be an error logged in the browser dev console:

Image

Expected behavior
No errors related to Google Analytics when clicking on buttons or links.

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Edge
  • Version: 132.0.2957.115
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants