Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/freebuff-bfcid.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@posthog/browser-common': patch
'@posthog/core': patch
'posthog-js': patch
---

Capture the Freebuff click identifier (`bfcid`) as a campaign parameter, so it is set on events and as `$initial_bfcid` like every other ad click ID.
1 change: 1 addition & 0 deletions packages/browser-common/src/utils/event-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export const PERSONAL_DATA_CAMPAIGN_PARAMS = [
'qclid', // quora
'sccid', // snapchat
'oppref', // openai ads
'bfcid', // freebuff
'irclid', // impact
'_kx', // klaviyo
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ exports[`FunctionalTests / Feature Flags > snapshots the decoded /flags wire env
"groups": {},
"person_properties": {
"$initial__kx": null,
"$initial_bfcid": null,
"$initial_current_url": "http://localhost/",
"$initial_dclid": null,
"$initial_epik": null,
Expand Down
5 changes: 5 additions & 0 deletions packages/browser/functional_tests/feature-flags.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ describe('FunctionalTests / Feature Flags', () => {
distinct_id: 'test-id',
person_properties: {
$initial__kx: null,
$initial_bfcid: null,
$initial_current_url: 'http://localhost/',
$initial_dclid: null,
$initial_epik: null,
Expand Down Expand Up @@ -224,6 +225,7 @@ describe('FunctionalTests / Feature Flags', () => {
groups: {},
person_properties: {
$initial__kx: null,
$initial_bfcid: null,
$initial_current_url: 'http://localhost/',
$initial_dclid: null,
$initial_epik: null,
Expand Down Expand Up @@ -277,6 +279,7 @@ describe('FunctionalTests / Feature Flags', () => {
groups: {},
person_properties: {
$initial__kx: null,
$initial_bfcid: null,
$initial_current_url: 'http://localhost/',
$initial_dclid: null,
$initial_epik: null,
Expand Down Expand Up @@ -364,6 +367,7 @@ describe('FunctionalTests / Feature Flags', () => {
groups: {},
person_properties: {
$initial__kx: null,
$initial_bfcid: null,
$initial_current_url: 'http://localhost/',
$initial_dclid: null,
$initial_epik: null,
Expand Down Expand Up @@ -434,6 +438,7 @@ describe('FunctionalTests / Feature Flags', () => {
groups: { playlist: 'id:77' },
person_properties: {
$initial__kx: null,
$initial_bfcid: null,
$initial_current_url: 'http://localhost/',
$initial_dclid: null,
$initial_epik: null,
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/browser/playwright/mocked/flags.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ test.describe('flags', () => {
$lib: 'web',
$lib_version: expect.any(String),
$initial__kx: null,
$initial_bfcid: null,
$initial_current_url: 'http://localhost:2345/playground/cypress/index.html',
$initial_dclid: null,
$initial_epik: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ exports[`identify() > calls capture with user properties if passed 1`] = `
"$current_url": "http://localhost/",
"$host": "localhost",
"$initial__kx": null,
"$initial_bfcid": null,
"$initial_current_url": "http://localhost/",
"$initial_dclid": null,
"$initial_epik": null,
Expand Down Expand Up @@ -42,6 +43,7 @@ exports[`identify() > calls capture with user properties if passed 1`] = `
"$referrer": "$direct",
"$referring_domain": "$direct",
"_kx": null,
"bfcid": null,
"dclid": null,
"epik": null,
"fbclid": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ exports[`posthog core > capture() > produces a representative $groupidentify cap
"$current_url": "https://example.com/",
"$host": "example.com",
"$initial__kx": null,
"$initial_bfcid": null,
"$initial_current_url": "https://example.com/",
"$initial_dclid": null,
"$initial_epik": null,
Expand Down Expand Up @@ -39,6 +40,7 @@ exports[`posthog core > capture() > produces a representative $groupidentify cap
"$referrer": "https://referrer.com",
"$referring_domain": "referrer.com",
"_kx": null,
"bfcid": null,
"dclid": null,
"epik": null,
"fbclid": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ describe('setAllPersonPropertiesForFlags', () => {
"$viewport_height": 768,
"$viewport_width": 1024,
"_kx": null,
"bfcid": null,
"dclid": null,
"epik": null,
"fbclid": null,
Expand Down
2 changes: 2 additions & 0 deletions packages/browser/src/__tests__/personProcessing.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { RemoteConfig } from '../types'
const INITIAL_CAMPAIGN_PARAMS_NULL = {
$initial_current_url: null,
$initial__kx: null,
$initial_bfcid: null,
$initial_dclid: null,
$initial_epik: null,
$initial_fbclid: null,
Expand Down Expand Up @@ -41,6 +42,7 @@ const INITIAL_CAMPAIGN_PARAMS_NULL = {

const CAMPAIGN_PARAMS_NULL = {
_kx: null,
bfcid: null,
dclid: null,
epik: null,
fbclid: null,
Expand Down
1 change: 1 addition & 0 deletions packages/browser/src/__tests__/session-props.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ describe('Session Props Manager', () => {
$referrer: 'http://referrer.example.com/referrer',
$referring_domain: 'referrer.example.com',
_kx: null,
bfcid: null,
dclid: null,
epik: null,
fbclid: null,
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/featureFlagUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ export const MINIMAL_FLAG_CALLED_EVENT_CAMPAIGN_PROPERTIES = [
'qclid',
'sccid',
'oppref',
'bfcid',
'irclid',
'_kx',
] as const
Expand Down
Loading