All project notes

Contribution

Ele Elyiana on candypixel.js

Established the browser capture script, adapted it for older browsers, and connected website form submissions to configurable campaign tracking.

Ele’s July 2019 commit 9adbd1b established a browser-side script that used jQuery in no-conflict mode. The standalone embed continued to evolve after Faiz Halim’s move to native browser events. In August 2020, Ele adjusted the request path for Internet Explorer where XDomainRequest was available.

In September 2021, Ele added the browser-side CandyCrumbs flow. The browser asked the service which tracker fields to collect, read the configured query-string values, and added the collection to the form data. The matching service endpoint was added in the CandyPixel checkout at 711717b. Read together, the changes show how a tenant’s tracking configuration became part of an incoming website enquiry.

From the diff

src/candypixel.js at 665b6d9 adds the endpoint and the submitted tracker collection at separate points in the code.

+        this.cpCrumbs = this.cp_sAppHost + "api/crumbs";
+                    sFormData.push({"collectionTracker":_this.cpCollectionTracker})

Selected commit log

  • 2019-07-31 · 9adbd1b · CandyPixel.js
  • 2020-08-03 · d114add · Changes for IE compatibility
  • 2021-09-28 · 665b6d9 · Upgrade script to handle CandyCrumbs trackers