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

[Website] Add Common Room script to website #11996

Open
calon-pulumi opened this issue Jun 7, 2024 · 3 comments
Open

[Website] Add Common Room script to website #11996

calon-pulumi opened this issue Jun 7, 2024 · 3 comments
Assignees
Labels
area/site Issues and feature enhancement requests for pulumi.com/docs. area/www Enhancement and content requests for www.pulumi.com
Milestone

Comments

@calon-pulumi
Copy link

Common Room app just added new features to capture web visits on our website.

From this guide, we'd like Step 1 and 2 followed. https://docs.commonroom.io/using-common-room/website-visitor-tracking/setup

Our unique web tracking script copied over from the app us:

<script> (function() { if (typeof window === 'undefined') return; if (typeof window.signals !== 'undefined') return; var script = document.createElement('script'); script.src = 'https://cdn.cr-relay.com/v1/site/a725b5ba-75f1-44dc-b250-11023fc10b9d/signals.js'; script.async = true; window.signals = Object.assign( [], ['page', 'identify', 'form'].reduce(function (acc, method){ acc[method] = function () { signals.push([method, arguments]); return signals; }; return acc; }, {}) ); document.head.appendChild(script); })(); </script>

@calon-pulumi calon-pulumi added needs-triage Needs attention from the triage team area/site Issues and feature enhancement requests for pulumi.com/docs. area/www Enhancement and content requests for www.pulumi.com labels Jun 7, 2024
@cnunciato
Copy link
Member

Let's also as part of this make sure we can't include it with the Segment script, rather than use the additional script tag.

@sean1588 sean1588 removed the needs-triage Needs attention from the triage team label Jun 10, 2024
@sean1588 sean1588 added this to the 0.106 milestone Jun 10, 2024
@calon-pulumi
Copy link
Author

calon-pulumi commented Jun 11, 2024

@cnunciato I did confirm from Common Room the below

"At the moment the easiest way to integrate Common Room SDK is to add the script snippet provided to your website. It tracks everything by default automatically. For tracking known contacts you'd need to add an identity call as well."

@calon-pulumi
Copy link
Author

@cnunciato I just wanted to check in on this if anything else you needed. Id like to also have this additional script deployed from RB2B. This in parallel to Common Room web visits should allow us to dynamically view people hitting our website that are known and anonymous. More info around RB2B if you needed it here

<script>!function () {var reb2b = window.reb2b = window.reb2b || []; if (reb2b.invoked) return;reb2b.invoked = true;reb2b.methods = ["identify", "collect"]; reb2b.factory = function (method) {return function () {var args = Array.prototype.slice.call(arguments); args.unshift(method);reb2b.push(args);return reb2b;};}; for (var i = 0; i < reb2b.methods.length; i++) {var key = reb2b.methods[i];reb2b[key] = reb2b.factory(key);} reb2b.load = function (key) {var script = document.createElement("script");script.type = "text/javascript";script.async = true; script.src = "https://s3-us-west-2.amazonaws.com/b2bjsstore/b/" + key + "/reb2b.js.gz"; var first = document.getElementsByTagName("script")[0]; first.parentNode.insertBefore(script, first);}; reb2b.SNIPPET_VERSION = "1.0.1";reb2b.load("Y4O7Z0HKLKNX");}();</script>

@cnunciato cnunciato modified the milestones: 0.106, 0.107 Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/site Issues and feature enhancement requests for pulumi.com/docs. area/www Enhancement and content requests for www.pulumi.com
Projects
Status: 🎬 Ready
Development

No branches or pull requests

3 participants