Skip to content

Conversation

@skeptrunedev
Copy link
Contributor

@skeptrunedev skeptrunedev commented Jan 25, 2026

Summary

  • Added reb2b-analytics.js to enable Reb2b analytics tracking across all documentation pages

Details

The script is automatically loaded on every page per Mintlify's custom scripts functionality. Any .js file in the content directory is included globally.


Note

Introduces Reb2b analytics by loading a third-party script globally.

  • Adds reb2b-analytics.js that sets window.reb2b and injects https://ddwl4m2hdecbv.cloudfront.net/b/<key>/<key>.js.gz using site key 0OV0VHYEM96Z, preventing duplicate loads
  • Script is auto-included on all pages via Mintlify custom scripts

Written by Cursor Bugbot for commit 18b55de. This will update automatically on new commits. Configure here.

@@ -0,0 +1 @@
!function(key) {if (window.reb2b) return;window.reb2b = {loaded: true};var s = document.createElement("script");s.async = true;s.src = "https://ddwl4m2hdecbv.cloudfront.net/b/" + key + "/" + key + ".js.gz";document.getElementsByTagName("script")[0].parentNode.insertBefore(s, document.getElementsByTagName("script")[0]);}("0OV0VHYEM96Z");
Copy link
Contributor

Choose a reason for hiding this comment

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

This will throw if the page ever renders without an existing <script> tag (since getElementsByTagName('script')[0] can be undefined). Since this file is loaded globally, it’s worth making the insertion path resilient.

Suggested change
!function(key) {if (window.reb2b) return;window.reb2b = {loaded: true};var s = document.createElement("script");s.async = true;s.src = "https://ddwl4m2hdecbv.cloudfront.net/b/" + key + "/" + key + ".js.gz";document.getElementsByTagName("script")[0].parentNode.insertBefore(s, document.getElementsByTagName("script")[0]);}("0OV0VHYEM96Z");
(function (key) {
if (typeof window === 'undefined' || typeof document === 'undefined') return;
if (window.reb2b) return;
window.reb2b = { loaded: true };
var script = document.createElement('script');
script.async = true;
script.src = 'https://ddwl4m2hdecbv.cloudfront.net/b/' + key + '/' + key + '.js.gz';
var firstScript = document.getElementsByTagName('script')[0];
if (firstScript && firstScript.parentNode) {
firstScript.parentNode.insertBefore(script, firstScript);
} else if (document.head) {
document.head.appendChild(script);
} else {
document.documentElement.appendChild(script);
}
})('0OV0VHYEM96Z');

@skeptrunedev skeptrunedev merged commit bfb02fb into main Jan 25, 2026
5 checks passed
@skeptrunedev skeptrunedev deleted the add-reb2b-analytics branch January 25, 2026 20:50
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