Skip to content

Commit

Permalink
Merge pull request #132 from UrbanInstitute/patch-analytics-inspect-p…
Browse files Browse the repository at this point in the history
…ageview

Patch analytics inspect pageview
  • Loading branch information
rachelmarconi authored Feb 11, 2025
2 parents a58d5b4 + 646bd90 commit a51bbc4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Next
- Patch: IconRefresh didn't have an export; added it.
- Patch: Analytics component sends dev-only start-up console log about state of sendPageview.

## v0.12.6
- Patch: DatawrapperSwitching story to wrap the bottom block in `if` instead of `key`.
Expand Down
7 changes: 7 additions & 0 deletions src/lib/Analytics/Analytics.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@
window.ui_dataviz_config = window.ui_dataviz_config || {};
window.ui_dataviz_config.analytics_title = title;
window.ui_dataviz_config.analytics_mode = mode;
if (mode == "development"){
console.log(
sendPageview
? "You are sending page views to GA, as for a full page app."
: "You are not sending page views to GA, as for an iframe embed."
);
}
});
</script>

Expand Down

0 comments on commit a51bbc4

Please sign in to comment.