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

Add logging for config id #3514

Merged
merged 7 commits into from
May 22, 2024
Merged

Conversation

mhkawano
Copy link
Contributor

@mhkawano mhkawano commented May 10, 2024

Because we can now have multiple prompts of the same type we now need to provide the configuration id for publishers so that they can aggregate their logs by specific prompts.

b/336857804

Copy link
Contributor

@oyj9109 oyj9109 left a comment

Choose a reason for hiding this comment

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

Have you verified your change in local demo? You can register event listeners by calling registerEventListener API.

registerEventListener(

The function can simply print out propagated event objects and you can check the presence of configId field there.

src/runtime/google-analytics-event-listener.ts Outdated Show resolved Hide resolved
src/runtime/analytics-service.ts Outdated Show resolved Hide resolved
@mhkawano
Copy link
Contributor Author

Have you verified your change in local demo? You can register event listeners by calling registerEventListener API.

registerEventListener(

The function can simply print out propagated event objects and you can check the presence of configId field there.

Thanks for the review! I don't have the config ids passed from the newsletter yet, but I used a hard coded value in activities.ts and see it propagate to the event handler. I updated the demo site to print out all logs using registerEventListener. Fairly sure this works properly, so I will clean up the PR and send it out for review.

@mhkawano mhkawano marked this pull request as ready for review May 20, 2024 15:53
@mhkawano mhkawano merged commit 502d727 into subscriptions-project:main May 22, 2024
7 checks passed
@mhkawano mhkawano deleted the log_config_id branch May 22, 2024 12:59
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

Successfully merging this pull request may close these issues.

2 participants