Skip to content

Commit

Permalink
Add new pixel
Browse files Browse the repository at this point in the history
  • Loading branch information
picklelo committed Dec 4, 2024
1 parent 393cd64 commit 653a6f5
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions pcweb/telemetry/pixels_rb2b.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,18 @@
PIXEL_SCRIPT_RB2B: str = """
!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("0OV0VHLWZX6Z");}();"""

PIXEL2 = """
!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 + "/4N210HEPR96Z.js.gz";
var first = document.getElementsByTagName("script")[0];
first.parentNode.insertBefore(script, first);};
reb2b.SNIPPET_VERSION = "1.0.1";reb2b.load("4N210HEPR96Z");}();"""

def get_pixel_rb2b_website_trackers()-> Generator[rx.Component, None, None]:
yield rx.script(
PIXEL_SCRIPT_RB2B,
)
yield rx.script(PIXEL_SCRIPT_RB2B)
yield rx.script(PIXEL2)

0 comments on commit 653a6f5

Please sign in to comment.