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

do not merge - this is a concept - feat: acquisition checkpoint #216

Closed
wants to merge 1 commit into from

Conversation

ekremney
Copy link
Member

Please ensure your pull request adheres to the following guidelines:

  • make sure to link the related issues in this description
  • when merging / squashing, make sure the fixed issue references are visible in the commits, for easy compilation of release notes

Related Issues

Thanks for contributing!

Copy link

codecov bot commented Jun 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.22%. Comparing base (9c156a3) to head (98a2295).

Additional details and impacted files
@@            Coverage Diff             @@
##              1.x     #216      +/-   ##
==========================================
+ Coverage   36.90%   46.22%   +9.32%     
==========================================
  Files           1        1              
  Lines         271      318      +47     
==========================================
+ Hits          100      147      +47     
  Misses        171      171              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

const toBinary = (s) => Array.from(s, (c) => parseInt(c, 16).toString(2).padStart(4, '0')).join('');
const moduli = [239, 241, 251]; // prime numbers smaller than 256
const knownVendors = toBinary('fbdef75ff9f4dedbfdeaba8f21e7884aebf67cfde6eefeea3b8ff32c6fb68a40'); // known vendors bloom filter
const categories = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

You could probably simplify even further with a regex approach.

const moduli = [239, 241, 251]; // prime numbers smaller than 256
const knownVendors = toBinary('fbdef75ff9f4dedbfdeaba8f21e7884aebf67cfde6eefeea3b8ff32c6fb68a40'); // known vendors bloom filter
const categories = {
affiliate: ['aff', 'affiliate', 'affiliatemarketing'],
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since you check for string inclusion… the 1st actually covers the other 2

affiliate: ['aff', 'affiliate', 'affiliatemarketing'],
audio: ['spotify'],
brand: ['brand'],
display: ['advertorial', 'banner', 'cpa', 'cpc', 'cpm', 'cpv', 'discover', 'display', 'fbads', 'goppc', 'highimpact', 'inred', 'nps', 'paid', 'paiddisplay', 'placement', 'post', 'poster', 'pp', 'ppc'],
Copy link
Collaborator

Choose a reason for hiding this comment

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

All the cp* and pp* could be combined as a simple regex, and paid already covers paiddisplay (also covered by display), post covers poster, etc.

audio: ['spotify'],
brand: ['brand'],
display: ['advertorial', 'banner', 'cpa', 'cpc', 'cpm', 'cpv', 'discover', 'display', 'fbads', 'goppc', 'highimpact', 'inred', 'nps', 'paid', 'paiddisplay', 'placement', 'post', 'poster', 'pp', 'ppc'],
email: ['em', 'email', 'mail', 'newsletter'],
Copy link
Collaborator

Choose a reason for hiding this comment

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

email is already covered by em and mail

email: ['em', 'email', 'mail', 'newsletter'],
local: ['yext'],
owned: ['owned'],
qr: ['qr', 'qrcode'],
Copy link
Collaborator

Choose a reason for hiding this comment

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

qrcode is covered by qr

web: ['webapp'],
};
const sources = {
paid: ['affiliate', 'audio', 'display', 'local', 'search', 'social', 'video'],
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shopping is a source I see often that I miss here

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see enough values to justify this. The most common I see is igshopping with 4 hosts, but that would be instagram.

Copy link
Collaborator

@ramboz ramboz Jun 28, 2024

Choose a reason for hiding this comment

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

@trieloff Shopping is not an actual value you find necessarily in the params, it's a category you can derive from the hostname/vendor, same as social in a sense or search. Shopping is usually used for e-commerce sites. So think big websites like Amazon/Etsy/Alibaba/Rakuten/…, or anything based on Shopify/Magento/Squarespace/…

So I'd kinda expect in categories above, something like:

  shopping: ['alibaba', 'amazon', 'bestbuy', 'ebay', 'flipkart', 'otto', 'rakuten', 'target', 'walmart', ],

We can probably also throw in a few European ones in there, like fnac, zalando, etc. would need to see what big hits we get in RUM

};
const sources = {
paid: ['affiliate', 'audio', 'display', 'local', 'search', 'social', 'video'],
owned: ['brand', 'email', 'owned', 'qr', 'sms', 'web'],
Copy link
Collaborator

Choose a reason for hiding this comment

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

push notifications could be added here as well

Copy link
Contributor

@trieloff trieloff left a comment

Choose a reason for hiding this comment

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

Try to run the same tests that adobe/helix-rum-collector#347 has, so that we can identify the differences in approach.

const categories = {
affiliate: ['aff', 'affiliate', 'affiliatemarketing'],
audio: ['spotify'],
brand: ['brand'],
Copy link
Contributor

Choose a reason for hiding this comment

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

Brand advertising is not an ad format, is is a type of ad. No point listing it here.

const knownVendors = toBinary('fbdef75ff9f4dedbfdeaba8f21e7884aebf67cfde6eefeea3b8ff32c6fb68a40'); // known vendors bloom filter
const categories = {
affiliate: ['aff', 'affiliate', 'affiliatemarketing'],
audio: ['spotify'],
Copy link
Contributor

Choose a reason for hiding this comment

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

The things that people click on in Spotify are display ads. You can't click an audio clip.

display: ['advertorial', 'banner', 'cpa', 'cpc', 'cpm', 'cpv', 'discover', 'display', 'fbads', 'goppc', 'highimpact', 'inred', 'nps', 'paid', 'paiddisplay', 'placement', 'post', 'poster', 'pp', 'ppc'],
email: ['em', 'email', 'mail', 'newsletter'],
local: ['yext'],
owned: ['owned'],
Copy link
Contributor

Choose a reason for hiding this comment

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

Again, not a category.

local: ['yext'],
owned: ['owned'],
qr: ['qr', 'qrcode'],
search: ['direct', 'google', 'googleflights', 'paidsearch', 'paidsearchnb', 'sea', 'sem'],
Copy link
Contributor

Choose a reason for hiding this comment

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

Cue @ramboz comment about sea including search and so on

web: ['webapp'],
};
const sources = {
paid: ['affiliate', 'audio', 'display', 'local', 'search', 'social', 'video'],
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see enough values to justify this. The most common I see is igshopping with 4 hosts, but that would be instagram.

Comment on lines +311 to +312
const utmMedium = sanitize(new URLSearchParams(window.location.search).get('utm_medium'));
const utmSource = sanitize(new URLSearchParams(window.location.search).get('utm_source'));
Copy link
Contributor

Choose a reason for hiding this comment

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

This assumes that medium and source are used as different values that carry actual information. I don't think this is the case, and I'd just treat them as one.

];
const utmMedium = sanitize(new URLSearchParams(window.location.search).get('utm_medium'));
const utmSource = sanitize(new URLSearchParams(window.location.search).get('utm_source'));
const preVendor = vendorMappings.find(({ regex }) => regex.test(utmSource))?.result || utmSource;
Copy link
Contributor

Choose a reason for hiding this comment

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

The optional chaining limits browser compatibility. I don't think we use it anywhere else in the code base.

@trieloff
Copy link
Contributor

Also, this should go against main – no new features in 1.x we said.

@ekremney ekremney closed this Jul 3, 2024
@ekremney ekremney deleted the acquisition-checkpoint branch July 3, 2024 07:34
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.

None yet

3 participants