Skip to content

Conversation

@DhairyaMajmudar
Copy link
Contributor

Description

This PR adds Google Tags Manager (GTM) and the utility files to push event data to the GTM datalayer.

Related issue(s)
Fixes #858

PR Testing

To test the PR one need to follow below steps:

  1. Create an account in Google tags manager
  2. Create a container for the AsyncAPI studio
  3. Copy the create GTM ID, it will be of format GTM-XXXXXXX
  4. Create .env file into apps/studio and taste the below env variable thier
NEXT_PUBLIC_ANALYTICS_ID=GTM-XXXXXXX

cc: @AayushSaini101

@changeset-bot
Copy link

changeset-bot bot commented Apr 10, 2025

🦋 Changeset detected

Latest commit: dd736e1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@asyncapi/studio Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@netlify
Copy link

netlify bot commented Apr 10, 2025

Deploy Preview for modest-rosalind-098b67 ready!

Name Link
🔨 Latest commit dd736e1
🔍 Latest deploy log https://app.netlify.com/projects/modest-rosalind-098b67/deploys/6832d9ef9cc04200086b6964
😎 Deploy Preview https://deploy-preview-1188--modest-rosalind-098b67.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Apr 10, 2025

Deploy Preview for asyncapi-studio-design-system ready!

Name Link
🔨 Latest commit dd736e1
🔍 Latest deploy log https://app.netlify.com/projects/asyncapi-studio-design-system/deploys/6832d9ef752e790008c65715
😎 Deploy Preview https://deploy-preview-1188--asyncapi-studio-design-system.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@Shurtu-gal
Copy link
Collaborator

You might need to do a netlify deploy with a dummy G-Tag from your account for verifying and testing purposes.

@AayushSaini101 would also have a look and let you know the other changes.

@AayushSaini101
Copy link

You might need to do a netlify deploy with a dummy G-Tag from your account for verifying and testing purposes.

@AayushSaini101 would also have a look and let you know the other changes.

@DhairyaMajmudar Let's do a testing for this and check whether it is analysing or, we can use deployed application and make some calls on the endpoints to test it thanks : )

@DhairyaMajmudar
Copy link
Contributor Author

Here is the netlify deployed demo link https://dummystudio.netlify.app/

I've also mentioned the steps about how to test this URL using Google Tag Manager in the PR description.

Other than these I've also created a short demo video, but unfortunately it leaks my Google tag manager ID, If that's okay I can share it to your slack DMs ?

cc: @Shurtu-gal @AayushSaini101

@DhairyaMajmudar
Copy link
Contributor Author

@Shurtu-gal @AayushSaini101 just a ping for PR review, Thank you =)

@asyncapi-bot asyncapi-bot added the bounty AsyncAPI Bounty label Apr 21, 2025
@aeworxet
Copy link
Contributor

@asyncapi/bounty_team

@aeworxet aeworxet moved this to In Progress in Bounty Program Apr 21, 2025
@AayushSaini101
Copy link

Here is the netlify deployed demo link https://dummystudio.netlify.app/

I've also mentioned the steps about how to test this URL using Google Tag Manager in the PR description.

Other than these I've also created a short demo video, but unfortunately it leaks my Google tag manager ID, If that's okay I can share it to your slack DMs ?

cc: @Shurtu-gal @AayushSaini101

sure share the video @DhairyaMajmudar

@DhairyaMajmudar
Copy link
Contributor Author

sure share the video @DhairyaMajmudar

Shared 👍🏻

@AayushSaini101
Copy link

sure share the video @DhairyaMajmudar

Shared 👍🏻

Waiting for the @Amzani approval thanks for the demo

@DhairyaMajmudar
Copy link
Contributor Author

@Amzani just a ping for PR review, Thank you : )

Copy link
Collaborator

@Amzani Amzani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If NEXT_PUBLIC_ANALYTICS_ID is not set, GTM_ID defaults to an empty string (''). It appears that the GoogleTagManager components will still be rendered even if GTM_ID is empty. This might result in an unintended attempt to load Google Tag Manager with an empty ID.

You might want to add a condition to check whether GTM_ID is non-empty before rendering the GoogleTagManager components to avoid this issue. Let me know if you'd like further assistance with this!

@github-project-automation github-project-automation bot moved this from Backlog to In progress in Studio - Kanban May 2, 2025
@DhairyaMajmudar DhairyaMajmudar requested a review from Amzani May 3, 2025 04:36
@aeworxet aeworxet mentioned this pull request May 5, 2025
@Shurtu-gal
Copy link
Collaborator

@Amzani you may need to need to finalize the list of events which are being tracked as well.

Amzani
Amzani previously approved these changes May 20, 2025
Copy link
Collaborator

@Amzani Amzani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-project-automation github-project-automation bot moved this from In progress to Ready in Studio - Kanban May 20, 2025
@Amzani
Copy link
Collaborator

Amzani commented May 20, 2025

@Shurtu-gal we can go with the implemented events for now, and add any missing one in the future.

@Shurtu-gal
Copy link
Collaborator

@DhairyaMajmudar could you just add a changeset and this would be good to go.

@Amzani you might need to register app in google, I don't have access for it.

@DhairyaMajmudar
Copy link
Contributor Author

@DhairyaMajmudar could you just add a changeset and this would be good to go.

Added a changeset, Thank you @Shurtu-gal

@sonarqubecloud
Copy link

@AayushSaini101
Copy link

/rtm

@asyncapi-bot asyncapi-bot merged commit ef86b5b into asyncapi:master May 25, 2025
20 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Completed in Bounty Program May 25, 2025
@github-project-automation github-project-automation bot moved this from Ready to Done in Studio - Kanban May 25, 2025
@DhairyaMajmudar DhairyaMajmudar deleted the analytics branch May 25, 2025 08:58
@Shurtu-gal Shurtu-gal mentioned this pull request May 27, 2025
@Shurtu-gal
Copy link
Collaborator

Reverting this PR as the env was not made and added leading to the website breaking.

Shurtu-gal added a commit that referenced this pull request May 27, 2025
@Shurtu-gal
Copy link
Collaborator

I will be adding the changes back once the requisite env has been added.

@aeworxet
Copy link
Contributor

😐

Shurtu-gal added a commit that referenced this pull request May 28, 2025
* Revert "feat: add analytics (#1188)"

This reverts commit ef86b5b.

* Create mean-foxes-change.md
@Shurtu-gal
Copy link
Collaborator

😐

Yeah it was our fault for not doing the due diligence. I will be adding these changes back once @fmvilas is available though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Completed
Status: Done

Development

Successfully merging this pull request may close these issues.

Install Google Analytics

6 participants