:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(cdp): send braids and retry with hashed identifiers in google ads (#125371)
Daniel Marchukf4ee0e5b8e0e
diff --git a/nodejs/src/cdp/templates/_destinations/google_ads/google.template.test.ts b/nodejs/src/cdp/templates/_destinations/google_ads/google.template.test.tsindex 04e6f94c65f9..cd3ace9a644f 100644--- a/nodejs/src/cdp/templates/_destinations/google_ads/google.template.test.ts+++ b/nodejs/src/cdp/templates/_destinations/google_ads/google.template.test.ts@@ -1,5 +1,8 @@+import { createHash } from 'crypto'import { DateTime, Settings } from 'luxon'+import { parseJSON } from '~/common/utils/json-parse'+import { TemplateTester, createAdDestinationPayload } from '../../test/test-helpers'import { template } from './google.template'@@ -228,9 +231,195 @@ describe('google template', () => {expect(response.logs.filter((log) => log.level === 'info').map((log) => log.message)).toMatchInlineSnapshot(`[- "No \`gclid\` or user identifiers. Skipping...",+ "No click ID or user identifiers. Skipping...",]`)expect(response.finished).toEqual(true)})++ const sha256 = (value: string): string => createHash('sha256').update(value).digest('hex')++ const invokeConversion = (+ personProperties: Record<string, any>,+ mapping: Record<string, any> = {}+ ): ReturnType<TemplateTester['invokeMapping']> =>+ tester.invokeMapping(+ 'Conversion',+ {+ oauth: { access_token: 'access-token' },+ customerId: '1231231234/5675675678',+ conversionActionId: '123456789',+ },+ createAdDestinationPayload({ person: { properties: personProperties } }),+ { phone: '{person.properties.phone}', ...mapping }+ )++ const sentConversion = (invocation: any): Record<string, any> =>+ parseJSON(invocation.queueParameters.body).conversions[0]++ const partialFailure = (...codes: string[]): Record<string, any> => ({+ partialFailureError: {+ message: codes.join(', '),+ details: [{ errors: codes.map((code) => ({ errorCode: { conversionUploadError: code } })) }],+ },+ })++ it.each([+ ['gclid only', { gclid: 'g1' }, { gclid: 'g1' }],+ ['gclid and gbraid', { gclid: 'g1', gbraid: 'b1' }, { gclid: 'g1', gbraid: 'b1' }],+ ['gclid and wbraid', { gclid: 'g1', wbraid: 'w1' }, { gclid: 'g1' }],+ ['gbraid and wbraid', { gclid: null, gbraid: 'b1', wbraid: 'w1' }, { gbraid: 'b1' }],+ ['wbraid only', { gclid: null, wbraid: 'w1' }, { wbraid: 'w1' }],+ ['whitespace around and instead of IDs', { gclid: ' ', gbraid: ' b1 ' }, { gbraid: 'b1' }],+ [+ '$initial_ fallbacks',+ { gclid: null, $initial_gclid: 'g0', $initial_gbraid: 'b0' },+ { gclid: 'g0', gbraid: 'b0' },+ ],+ ])('sends a valid click ID combination for %s', async (_, properties, expected) => {+ const response = await invokeConversion(properties)++ const conversion = sentConversion(response.invocation)+ expect({ gclid: conversion.gclid, gbraid: conversion.gbraid, wbraid: conversion.wbraid }).toEqual({+ gclid: undefined,+ gbraid: undefined,+ wbraid: undefined,+ ...expected,+ })+ })++ it.each([+ ['trims and lowercases email', { email: ' [email protected] ' }, { hashed_email: '[email protected]' }],+ [+ 'drops gmail dots but keeps plus',+ { email: '[email protected]' },+ { hashed_email: '[email protected]' },+ ],+ ['omits a malformed email', { email: 'not-an-email' }, {}],+ ['strips phone separators', { phone: '+1 (425) 555-1234' }, { hashed_phone_number: '+14255551234' }],+ ['converts a 00 prefix', { phone: '0044 20 7946 0958' }, { hashed_phone_number: '+442079460958' }],+ ['omits a number without a country code prefix', { phone: '4155551234' }, {}],+ ['omits a domestic number', { phone: '020 7946 0958' }, {}],+ ])('normalizes user identifiers before hashing: %s', async (_, properties, expected) => {+ const response = await invokeConversion({ gclid: 'g1', email: null, phone: null, ...properties })++ const identifiers = sentConversion(response.invocation).user_identifiers ?? []+ expect(Object.assign({}, ...identifiers)).toEqual(+ Object.fromEntries(Object.entries(expected).map(([key, value]) => [key, sha256(value)]))+ )+ })++ it.each(['EXPIRED_EVENT', 'UNPARSEABLE_GCLID', 'INVALID_CUSTOMER_FOR_CLICK', 'UNAUTHORIZED_CUSTOMER'])(+ 'retries once with hashed identifiers only when Google rejects the click ID with %s',+ async (code) => {+ const response = await invokeConversion({ gclid: 'g1', gbraid: 'b1' })+ const retry = await tester.invokeFetchResponse(response.invocation, {+ status: 200,+ body: partialFailure(code),+ })++ expect(retry.finished).toBe(false)+ const conversion = sentConversion(retry.invocation)+ expect(conversion.gclid).toBeUndefined()+ expect(conversion.gbraid).toBeUndefined()+ expect(conversion.user_identifiers).toEqual(sentConversion(response.invocation).user_identifiers)++ const done = await tester.invokeFetchResponse(retry.invocation, { status: 200, body: { results: [{}] } })+ expect(done.finished).toBe(true)+ expect(done.error).toBeUndefined()+ }+ )++ it.each([+ ['fieldError', 'VALUE_MUST_BE_UNSET'],+ ['conversionUploadError', 'UNPARSEABLE_GBRAID'],+ ['conversionUploadError', 'ONE_PER_CLICK_CONVERSION_ACTION_NOT_PERMITTED_WITH_BRAID'],+ ])('retries with the gclid only when Google refuses the gbraid with %s %s', async (kind, code) => {+ const response = await invokeConversion({ gclid: 'g1', gbraid: 'b1' })+ const retry = await tester.invokeFetchResponse(response.invocation, {+ status: 200,+ body: { partialFailureError: { message: code, details: [{ errors: [{ errorCode: { [kind]: code } }] }] } },+ })++ expect(retry.finished).toBe(false)+ const conversion = sentConversion(retry.invocation)+ expect({ gclid: conversion.gclid, gbraid: conversion.gbraid }).toEqual({ gclid: 'g1', gbraid: undefined })+ expect(conversion.user_identifiers).toEqual(sentConversion(response.invocation).user_identifiers)++ const done = await tester.invokeFetchResponse(retry.invocation, { status: 200, body: { results: [{}] } })+ expect(done.finished).toBe(true)+ expect(done.error).toBeUndefined()+ })++ it.each(['INVALID_USER_IDENTIFIER', 'CUSTOMER_NOT_ACCEPTED_CUSTOMER_DATA_TERMS'])(+ 'retries once with the click ID only when Google rejects the hashed email/phone with %s',+ async (code) => {+ const response = await invokeConversion({ gclid: 'g1', gbraid: 'b1' })+ const retry = await tester.invokeFetchResponse(response.invocation, {+ status: 200,+ body: partialFailure(code),+ })++ expect(retry.finished).toBe(false)+ const conversion = sentConversion(retry.invocation)+ expect(conversion.user_identifiers).toBeUndefined()+ expect({ gclid: conversion.gclid, gbraid: conversion.gbraid }).toEqual({ gclid: 'g1', gbraid: 'b1' })++ const done = await tester.invokeFetchResponse(retry.invocation, { status: 200, body: { results: [{}] } })+ expect(done.finished).toBe(true)+ expect(done.error).toBeUndefined()+ }+ )++ it.each([+ ['a click ID rejection without user identifiers', { gclid: 'g1', email: null, phone: null }, ['EXPIRED_EVENT']],+ ['a click ID rejection mixed with another error', {}, ['EXPIRED_EVENT', 'NO_CONVERSION_ACTION_FOUND']],+ ['a user data rejection without a click ID', { gclid: null }, ['INVALID_USER_IDENTIFIER']],+ ['both the click ID and the user data rejected', {}, ['EXPIRED_EVENT', 'INVALID_USER_IDENTIFIER']],+ ['a non click ID error', {}, ['TOO_RECENT_EVENT']],+ ])('fails without retrying on %s', async (_, properties, codes) => {+ const response = await invokeConversion(properties)+ const result = await tester.invokeFetchResponse(response.invocation, {+ status: 200,+ body: partialFailure(...codes),+ })++ expect(result.finished).toBe(true)+ expect(result.error).toEqual(`Error from googleads.googleapis.com (status 200): ${codes.join(', ')}`)+ })++ it('fails when the hashed retry is also rejected', async () => {+ const response = await invokeConversion({})+ const retry = await tester.invokeFetchResponse(response.invocation, {+ status: 200,+ body: partialFailure('EXPIRED_EVENT'),+ })+ const result = await tester.invokeFetchResponse(retry.invocation, {+ status: 200,+ body: partialFailure('CUSTOMER_NOT_ACCEPTED_CUSTOMER_DATA_TERMS'),+ })++ expect(result.finished).toBe(true)+ expect(result.error).toEqual(+ 'Error from googleads.googleapis.com (status 200): CUSTOMER_NOT_ACCEPTED_CUSTOMER_DATA_TERMS'+ )+ })++ it.each([+ [+ 'CLICK_NOT_FOUND',+ 'Google could not match the hashed email/phone to an ad click. The conversion was not recorded.',+ ],+ ['ORDER_ID_ALREADY_IN_USE', 'Google already recorded this conversion. Skipping...'],+ ])('logs %s without failing', async (code, message) => {+ const response = await invokeConversion({ gclid: null })+ const result = await tester.invokeFetchResponse(response.invocation, {+ status: 200,+ body: partialFailure(code),+ })++ expect(result.finished).toBe(true)+ expect(result.error).toBeUndefined()+ expect(result.logs.map((log) => log.message)).toContain(message)+ })})diff --git a/nodejs/src/cdp/templates/_destinations/google_ads/google.template.ts b/nodejs/src/cdp/templates/_destinations/google_ads/google.template.tsindex ef70f6c82a6a..6a18439171cf 100644--- a/nodejs/src/cdp/templates/_destinations/google_ads/google.template.ts+++ b/nodejs/src/cdp/templates/_destinations/google_ads/google.template.ts@@ -26,6 +26,25 @@ const build_inputs = (): HogFunctionInputSchemaType[] => {secret: false,required: false,},+ {+ key: 'gbraid',+ type: 'string',+ label: 'Google click ID for iOS app campaigns (gbraid)',+ description:+ 'The gbraid from an iOS app campaign click. Sent together with the gclid when both are set. If Google refuses the pair, only the gclid is sent.',+ default: '{person.properties.gbraid ?? person.properties.$initial_gbraid}',+ secret: false,+ required: false,+ },+ {+ key: 'wbraid',+ type: 'string',+ label: 'Google click ID for iOS web campaigns (wbraid)',+ description: 'The wbraid from an iOS web campaign click. Only sent when there is no gclid or gbraid.',+ default: '{person.properties.wbraid ?? person.properties.$initial_wbraid}',+ secret: false,+ required: false,+ },{key: 'conversionDateTime',type: 'string',@@ -70,7 +89,7 @@ const build_inputs = (): HogFunctionInputSchemaType[] => {type: 'string',label: 'Email address',description:- 'Email address for enhanced conversions, used when no gclid is available. Sent SHA-256 hashed; leave blank to omit. Normalize (lowercase, trimmed) for best match rates.',+ 'Email address for enhanced conversions. Used to match the conversion when there is no click ID or Google rejects it. Normalized and sent SHA-256 hashed; leave blank to omit.',default: '{person.properties.email}',secret: false,required: false,@@ -80,7 +99,7 @@ const build_inputs = (): HogFunctionInputSchemaType[] => {type: 'string',label: 'Phone number',description:- 'Phone number for enhanced conversions, used when no gclid is available. Sent SHA-256 hashed; leave blank to omit. Normalize to E.164 format (e.g. +14255551234) for best match rates.',+ 'Phone number for enhanced conversions, including the country code (e.g. +14255551234). Used to match the conversion when there is no click ID or Google rejects it. Normalized to E.164 and sent SHA-256 hashed; numbers without a country code are left out.',default: '',secret: false,required: false,@@ -99,59 +118,171 @@ export const template: HogFunctionTemplate = {category: ['Advertisement'],code_language: 'hog',code: `-let userIdentifiers := []-if (not empty(inputs.email)) {- userIdentifiers := arrayPushBack(userIdentifiers, {'hashed_email': sha256Hex(lower(trim(inputs.email)))})+// Google rejects these for the click ID only, so the same conversion can still match on hashed email or phone.+let CLICK_ID_REJECTED_CODES := ['UNPARSEABLE_GCLID', 'UNPARSEABLE_GBRAID', 'UNPARSEABLE_WBRAID', 'EXPIRED_EVENT', 'EVENT_NOT_FOUND', 'CONVERSION_PRECEDES_EVENT', 'INVALID_CUSTOMER_FOR_CLICK', 'UNAUTHORIZED_CUSTOMER', 'ONE_PER_CLICK_CONVERSION_ACTION_NOT_PERMITTED_WITH_BRAID']+// Google rejects these for the hashed email or phone only, so the same conversion can still match on the click ID.+let USER_DATA_REJECTED_CODES := ['INVALID_USER_IDENTIFIER', 'UNSUPPORTED_USER_IDENTIFIER', 'CUSTOMER_NOT_ACCEPTED_CUSTOMER_DATA_TERMS', 'CUSTOMER_DATA_POLICY_PROHIBITS_ENHANCED_CONVERSIONS', 'CUSTOMER_NOT_ENABLED_ENHANCED_CONVERSIONS_FOR_LEADS']+let ALREADY_RECORDED_CODES := ['ORDER_ID_ALREADY_IN_USE', 'CLICK_CONVERSION_ALREADY_EXISTS']++fun normalizeEmail(raw) {+ let email := lower(replaceAll(trim(raw), ' ', ''))+ let parts := splitByString('@', email)+ if (length(parts) != 2 or empty(parts[1]) or empty(parts[2])) {+ return null+ }+ if (parts[2] == 'gmail.com' or parts[2] == 'googlemail.com') {+ return f'{replaceAll(parts[1], '.', '')}@{parts[2]}'+ }+ return email}-if (not empty(inputs.phone)) {- userIdentifiers := arrayPushBack(userIdentifiers, {'hashed_phone_number': sha256Hex(lower(trim(inputs.phone)))})++fun normalizePhone(raw) {+ let phone := trim(raw)+ for (let separator in [' ', '-', '.', '(', ')']) {+ phone := replaceAll(phone, separator, '')+ }+ // Without a + or 00 prefix the country code is unknown, and guessing one hashes another person's number.+ if (startsWith(phone, '00')) {+ phone := f'+{substring(phone, 3)}'+ }+ if (not match(phone, '^[+][1-9][0-9]{6,14}$')) {+ return null+ }+ return phone}-if (empty(inputs.gclid) and empty(userIdentifiers)) {- print('No \`gclid\` or user identifiers. Skipping...')- return+fun uploadErrorCodes(res) {+ let codes := []+ for (let detail in res.body.partialFailureError.details ?? []) {+ for (let error in detail.errors ?? []) {+ codes := arrayPushBack(codes, error.errorCode.conversionUploadError ?? error.errorCode.fieldError ?? 'OTHER')+ }+ }+ return codes}-let conversion := {- 'conversion_action': f'customers/{splitByString('/', inputs.customerId)[1]}/conversionActions/{inputs.conversionActionId}',- 'conversion_date_time': inputs.conversionDateTime+fun allIn(values, allowed) {+ if (empty(values)) {+ return false+ }+ for (let value in values) {+ if (not has(allowed, value)) {+ return false+ }+ }+ return true}-if (not empty(inputs.gclid)) {- conversion.gclid := inputs.gclid++fun upload(clickIds, userIdentifiers) {+ let conversion := {+ 'conversion_action': f'customers/{splitByString('/', inputs.customerId)[1]}/conversionActions/{inputs.conversionActionId}',+ 'conversion_date_time': inputs.conversionDateTime+ }+ for (let key, value in clickIds) {+ conversion[key] := value+ }+ if (not empty(userIdentifiers)) {+ conversion.user_identifiers := userIdentifiers+ }+ if (not empty(inputs.conversionValue)) {+ conversion.conversion_value := inputs.conversionValue+ }+ if (not empty(inputs.currencyCode)) {+ conversion.currency_code := inputs.currencyCode+ }+ if (not empty(inputs.orderId)) {+ conversion.order_id := inputs.orderId+ }++ let res := fetch(f'https://googleads.googleapis.com/v24/customers/{splitByString('/', inputs.customerId)[1]}:uploadClickConversions', {+ 'method': 'POST',+ 'headers': {+ 'Authorization': f'Bearer {inputs.oauth.access_token}',+ 'Content-Type': 'application/json',+ 'login-customer-id': splitByString('/', inputs.customerId)[2]+ },+ 'body': {+ 'conversions': [conversion],+ 'partialFailure': true+ }+ })++ if (res.status >= 400) {+ throw Error(f'Error from googleads.googleapis.com (status {res.status}): {res.body}')+ }+ return res}-if (not empty(userIdentifiers)) {- conversion.user_identifiers := userIdentifiers++let userIdentifiers := []+if (not empty(inputs.email)) {+ let email := normalizeEmail(inputs.email)+ if (not empty(email)) {+ userIdentifiers := arrayPushBack(userIdentifiers, {'hashed_email': sha256Hex(email)})+ }}-if (not empty(inputs.conversionValue)) {- conversion.conversion_value := inputs.conversionValue+if (not empty(inputs.phone)) {+ let phone := normalizePhone(inputs.phone)+ if (not empty(phone)) {+ userIdentifiers := arrayPushBack(userIdentifiers, {'hashed_phone_number': sha256Hex(phone)})+ }}-if (not empty(inputs.currencyCode)) {- conversion.currency_code := inputs.currencyCode++let gclid := trim(toString(inputs.gclid ?? ''))+let gbraid := trim(toString(inputs.gbraid ?? ''))+let wbraid := trim(toString(inputs.wbraid ?? ''))++// Google accepts a gclid with a gbraid, but never a gbraid with a wbraid.+let clickIds := {}+if (not empty(gclid)) {+ clickIds.gclid := gclid+ if (not empty(gbraid)) {+ clickIds.gbraid := gbraid+ }+} else if (not empty(gbraid)) {+ clickIds.gbraid := gbraid+} else if (not empty(wbraid)) {+ clickIds.wbraid := wbraid}-if (not empty(inputs.orderId)) {- conversion.order_id := inputs.orderId++if (empty(clickIds) and empty(userIdentifiers)) {+ print('No click ID or user identifiers. Skipping...')+ return}-let body := {- 'conversions': [conversion],- 'partialFailure': true+let res := upload(clickIds, userIdentifiers)+let codes := uploadErrorCodes(res)++// Google recommends sending a gclid with its gbraid, but some accounts refuse the pair, and a bad gbraid+// must not cost the conversion its valid gclid.+if (not empty(clickIds.gclid) and not empty(clickIds.gbraid) and allIn(codes, ['VALUE_MUST_BE_UNSET', 'UNPARSEABLE_GBRAID', 'ONE_PER_CLICK_CONVERSION_ACTION_NOT_PERMITTED_WITH_BRAID'])) {+ print(f'Google refused the gbraid ({arrayStringConcat(codes, ', ')}). Retrying with the gclid only.')+ clickIds := {'gclid': clickIds.gclid}+ res := upload(clickIds, userIdentifiers)+ codes := uploadErrorCodes(res)}-let res := fetch(f'https://googleads.googleapis.com/v24/customers/{splitByString('/', inputs.customerId)[1]}:uploadClickConversions', {- 'method': 'POST',- 'headers': {- 'Authorization': f'Bearer {inputs.oauth.access_token}',- 'Content-Type': 'application/json',- 'login-customer-id': splitByString('/', inputs.customerId)[2]- },- 'body': body-})+if (not empty(clickIds) and not empty(userIdentifiers) and allIn(codes, CLICK_ID_REJECTED_CODES)) {+ print(f'Google rejected the click ID ({arrayStringConcat(codes, ', ')}). Retrying with hashed email/phone only.')+ res := upload({}, userIdentifiers)+ codes := uploadErrorCodes(res)+} else if (not empty(clickIds) and not empty(userIdentifiers) and allIn(codes, USER_DATA_REJECTED_CODES)) {+ print(f'Google rejected the hashed email/phone ({arrayStringConcat(codes, ', ')}). Retrying with the click ID only.')+ res := upload(clickIds, [])+ codes := uploadErrorCodes(res)+}-if (res.status >= 400) {- throw Error(f'Error from googleads.googleapis.com (status {res.status}): {res.body}')-} else if (not empty(res.body.partialFailureError)) {- throw Error(f'Error from googleads.googleapis.com (status {res.status}): {res.body.partialFailureError.message}')+if (empty(res.body.partialFailureError)) {+ return+}+if (allIn(codes, ['CLICK_NOT_FOUND'])) {+ print('Google could not match the hashed email/phone to an ad click. The conversion was not recorded.')+ return+}+if (allIn(codes, ALREADY_RECORDED_CODES)) {+ print('Google already recorded this conversion. Skipping...')+ return}+throw Error(f'Error from googleads.googleapis.com (status {res.status}): {res.body.partialFailureError.message}')`,inputs_schema: [{diff --git a/nodejs/tests/fixtures/hog-bytecode/2c011d18ef1dc4a68d958d157006016ea361d384cf94de2e3325804c5116a8a4.json b/nodejs/tests/fixtures/hog-bytecode/2c011d18ef1dc4a68d958d157006016ea361d384cf94de2e3325804c5116a8a4.jsonnew file mode 100644index 000000000000..23e1a7ea03e9--- /dev/null+++ b/nodejs/tests/fixtures/hog-bytecode/2c011d18ef1dc4a68d958d157006016ea361d384cf94de2e3325804c5116a8a4.json@@ -0,0 +1 @@+["_H",1,32,"UNPARSEABLE_GCLID",32,"UNPARSEABLE_GBRAID",32,"UNPARSEABLE_WBRAID",32,"EXPIRED_EVENT",32,"EVENT_NOT_FOUND",32,"CONVERSION_PRECEDES_EVENT",32,"INVALID_CUSTOMER_FOR_CLICK",32,"ONE_PER_CLICK_CONVERSION_ACTION_NOT_PERMITTED_WITH_BRAID",43,8,32,"ORDER_ID_ALREADY_IN_USE",32,"CLICK_CONVERSION_ALREADY_EXISTS",43,2,52,"normalizeEmail",1,0,100,36,0,2,"trim",1,32," ",32,"",2,"replaceAll",3,2,"lower",1,32,"@",36,1,2,"splitByString",2,33,2,36,2,2,"length",1,12,36,2,33,1,45,2,"empty",1,36,2,33,2,45,2,"empty",1,4,3,40,2,31,38,32,"gmail.com",36,2,33,2,45,11,32,"googlemail.com",36,2,33,2,45,11,4,2,40,23,36,2,33,1,45,32,".",32,"",2,"replaceAll",3,32,"@",36,2,33,2,45,2,"concat",3,38,36,1,38,35,35,53,0,52,"normalizePhone",1,0,129,36,0,2,"trim",1,32," ",32,"-",32,".",32,"(",32,")",43,5,36,2,2,"values",1,33,1,36,3,2,"length",1,31,36,5,36,4,16,40,27,36,3,36,4,45,37,6,36,1,36,6,32,"",2,"replaceAll",3,37,1,36,4,33,1,6,37,4,39,-34,35,35,35,35,35,36,1,32,"00",2,"startsWith",2,40,16,32,"+",36,1,33,3,2,"substring",2,2,"concat",2,37,1,39,19,36,1,32,"+",2,"startsWith",2,5,40,9,32,"+",36,1,2,"concat",2,37,1,36,1,32,"^[+][1-9][0-9]{6,14}$",2,"match",2,5,40,2,31,38,36,1,38,35,53,0,52,"uploadErrorCodes",1,0,134,43,0,36,0,32,"body",45,32,"partialFailureError",45,32,"details",45,47,3,35,43,0,36,2,2,"values",1,33,1,36,3,2,"length",1,31,36,5,36,4,16,40,87,36,3,36,4,45,37,6,36,6,32,"errors",45,47,3,35,43,0,36,7,2,"values",1,33,1,36,8,2,"length",1,31,36,10,36,9,16,40,36,36,8,36,9,45,37,11,36,1,36,11,32,"errorCode",45,32,"conversionUploadError",45,47,3,35,32,"OTHER",2,"arrayPushBack",2,37,1,36,9,33,1,6,37,9,39,-43,35,35,35,35,35,36,4,33,1,6,37,4,39,-94,35,35,35,35,35,36,1,38,35,53,0,52,"allIn",2,0,66,36,0,2,"empty",1,40,2,30,38,36,0,36,2,2,"values",1,33,1,36,3,2,"length",1,31,36,5,36,4,16,40,28,36,3,36,4,45,37,6,36,1,36,6,2,"has",2,5,40,2,30,38,36,4,33,1,6,37,4,39,-35,35,35,35,35,35,29,38,53,0,52,"upload",2,0,306,32,"conversion_action",32,"customers/",32,"/",32,"customerId",32,"inputs",1,2,2,"splitByString",2,33,1,45,32,"/conversionActions/",32,"conversionActionId",32,"inputs",1,2,2,"concat",4,32,"conversion_date_time",32,"conversionDateTime",32,"inputs",1,2,42,2,36,0,36,3,2,"keys",1,36,3,2,"values",1,33,1,36,5,2,"length",1,31,31,36,7,36,6,16,40,30,36,4,36,6,45,37,8,36,5,36,6,45,37,9,36,2,36,8,36,9,46,36,6,33,1,6,37,6,39,-37,35,35,35,35,35,35,35,36,1,2,"empty",1,5,40,7,36,2,32,"user_identifiers",36,1,46,32,"conversionValue",32,"inputs",1,2,2,"empty",1,5,40,11,36,2,32,"conversion_value",32,"conversionValue",32,"inputs",1,2,46,32,"currencyCode",32,"inputs",1,2,2,"empty",1,5,40,11,36,2,32,"currency_code",32,"currencyCode",32,"inputs",1,2,46,32,"orderId",32,"inputs",1,2,2,"empty",1,5,40,11,36,2,32,"order_id",32,"orderId",32,"inputs",1,2,46,32,"https://googleads.googleapis.com/v24/customers/",32,"/",32,"customerId",32,"inputs",1,2,2,"splitByString",2,33,1,45,32,":uploadClickConversions",2,"concat",3,32,"method",32,"POST",32,"headers",32,"Authorization",32,"Bearer ",32,"access_token",32,"oauth",32,"inputs",1,3,2,"concat",2,32,"Content-Type",32,"application/json",32,"login-customer-id",32,"/",32,"customerId",32,"inputs",1,2,2,"splitByString",2,33,2,45,42,3,32,"body",32,"conversions",36,2,43,1,32,"partialFailure",29,42,2,42,3,2,"fetch",2,33,400,36,3,32,"status",45,14,40,21,32,"Error from googleads.googleapis.com (status ",36,3,32,"status",45,32,"): ",36,3,32,"body",45,2,"concat",4,2,"Error",1,49,36,3,38,35,35,53,0,43,0,32,"email",32,"inputs",1,2,2,"empty",1,5,40,35,32,"email",32,"inputs",1,2,36,2,54,1,36,8,2,"empty",1,5,40,16,36,7,32,"hashed_email",36,8,2,"sha256Hex",1,42,1,2,"arrayPushBack",2,37,7,35,32,"phone",32,"inputs",1,2,2,"empty",1,5,40,35,32,"phone",32,"inputs",1,2,36,3,54,1,36,8,2,"empty",1,5,40,16,36,7,32,"hashed_phone_number",36,8,2,"sha256Hex",1,42,1,2,"arrayPushBack",2,37,7,35,42,0,32,"gclid",32,"inputs",1,2,2,"empty",1,5,40,36,36,8,32,"gclid",32,"gclid",32,"inputs",1,2,46,32,"gbraid",32,"inputs",1,2,2,"empty",1,5,40,11,36,8,32,"gbraid",32,"gbraid",32,"inputs",1,2,46,39,48,32,"gbraid",32,"inputs",1,2,2,"empty",1,5,40,13,36,8,32,"gbraid",32,"gbraid",32,"inputs",1,2,46,39,23,32,"wbraid",32,"inputs",1,2,2,"empty",1,5,40,11,36,8,32,"wbraid",32,"wbraid",32,"inputs",1,2,46,36,8,2,"empty",1,36,7,2,"empty",1,3,2,40,8,32,"No click ID or user identifiers. Skipping...",2,"print",1,35,31,38,36,8,36,7,36,6,54,2,36,9,36,4,54,1,36,8,2,"empty",1,5,36,7,2,"empty",1,5,36,10,36,0,36,5,54,2,3,3,40,36,32,"Google rejected the click ID (",36,10,32,", ",2,"arrayStringConcat",2,32,"). Retrying with hashed email/phone only.",2,"concat",3,2,"print",1,35,42,0,36,7,36,6,54,2,37,9,36,9,36,4,54,1,37,10,36,9,32,"body",45,32,"partialFailureError",45,2,"empty",1,40,2,31,38,36,10,32,"CLICK_NOT_FOUND",43,1,36,5,54,2,40,8,32,"Google could not match the hashed email/phone to an ad click. The conversion was not recorded.",2,"print",1,35,31,38,36,10,36,1,36,5,54,2,40,8,32,"Google already recorded this conversion. Skipping...",2,"print",1,35,31,38,32,"Error from googleads.googleapis.com (status ",36,9,32,"status",45,32,"): ",36,9,32,"body",45,32,"partialFailureError",45,32,"message",45,2,"concat",4,2,"Error",1,49,35,35,35,35,35,35,35,35,35,35,35]diff --git a/nodejs/tests/fixtures/hog-bytecode/4f19ce09006f1ef2d3e8b17f4768a3328badc3ea1e799ad6e893ebf657804430.json b/nodejs/tests/fixtures/hog-bytecode/4f19ce09006f1ef2d3e8b17f4768a3328badc3ea1e799ad6e893ebf657804430.jsonnew file mode 100644index 000000000000..d14e654fbc86--- /dev/null+++ b/nodejs/tests/fixtures/hog-bytecode/4f19ce09006f1ef2d3e8b17f4768a3328badc3ea1e799ad6e893ebf657804430.json@@ -0,0 +1 @@+["_H",1,32,"UNPARSEABLE_GCLID",32,"UNPARSEABLE_GBRAID",32,"UNPARSEABLE_WBRAID",32,"EXPIRED_EVENT",32,"EVENT_NOT_FOUND",32,"CONVERSION_PRECEDES_EVENT",32,"INVALID_CUSTOMER_FOR_CLICK",32,"UNAUTHORIZED_CUSTOMER",32,"ONE_PER_CLICK_CONVERSION_ACTION_NOT_PERMITTED_WITH_BRAID",43,9,32,"INVALID_USER_IDENTIFIER",32,"UNSUPPORTED_USER_IDENTIFIER",32,"CUSTOMER_NOT_ACCEPTED_CUSTOMER_DATA_TERMS",32,"CUSTOMER_DATA_POLICY_PROHIBITS_ENHANCED_CONVERSIONS",32,"CUSTOMER_NOT_ENABLED_ENHANCED_CONVERSIONS_FOR_LEADS",43,5,32,"ORDER_ID_ALREADY_IN_USE",32,"CLICK_CONVERSION_ALREADY_EXISTS",43,2,52,"normalizeEmail",1,0,100,36,0,2,"trim",1,32," ",32,"",2,"replaceAll",3,2,"lower",1,32,"@",36,1,2,"splitByString",2,33,2,36,2,2,"length",1,12,36,2,33,1,45,2,"empty",1,36,2,33,2,45,2,"empty",1,4,3,40,2,31,38,32,"gmail.com",36,2,33,2,45,11,32,"googlemail.com",36,2,33,2,45,11,4,2,40,23,36,2,33,1,45,32,".",32,"",2,"replaceAll",3,32,"@",36,2,33,2,45,2,"concat",3,38,36,1,38,35,35,53,0,52,"normalizePhone",1,0,108,36,0,2,"trim",1,32," ",32,"-",32,".",32,"(",32,")",43,5,36,2,2,"values",1,33,1,36,3,2,"length",1,31,36,5,36,4,16,40,27,36,3,36,4,45,37,6,36,1,36,6,32,"",2,"replaceAll",3,37,1,36,4,33,1,6,37,4,39,-34,35,35,35,35,35,36,1,32,"00",2,"startsWith",2,40,14,32,"+",36,1,33,3,2,"substring",2,2,"concat",2,37,1,36,1,32,"^[+][1-9][0-9]{6,14}$",2,"match",2,5,40,2,31,38,36,1,38,35,53,0,52,"uploadErrorCodes",1,0,145,43,0,36,0,32,"body",45,32,"partialFailureError",45,32,"details",45,47,3,35,43,0,36,2,2,"values",1,33,1,36,3,2,"length",1,31,36,5,36,4,16,40,98,36,3,36,4,45,37,6,36,6,32,"errors",45,47,3,35,43,0,36,7,2,"values",1,33,1,36,8,2,"length",1,31,36,10,36,9,16,40,47,36,8,36,9,45,37,11,36,1,36,11,32,"errorCode",45,32,"conversionUploadError",45,47,9,35,36,11,32,"errorCode",45,32,"fieldError",45,47,3,35,32,"OTHER",2,"arrayPushBack",2,37,1,36,9,33,1,6,37,9,39,-54,35,35,35,35,35,36,4,33,1,6,37,4,39,-105,35,35,35,35,35,36,1,38,35,53,0,52,"allIn",2,0,66,36,0,2,"empty",1,40,2,30,38,36,0,36,2,2,"values",1,33,1,36,3,2,"length",1,31,36,5,36,4,16,40,28,36,3,36,4,45,37,6,36,1,36,6,2,"has",2,5,40,2,30,38,36,4,33,1,6,37,4,39,-35,35,35,35,35,35,29,38,53,0,52,"upload",2,0,306,32,"conversion_action",32,"customers/",32,"/",32,"customerId",32,"inputs",1,2,2,"splitByString",2,33,1,45,32,"/conversionActions/",32,"conversionActionId",32,"inputs",1,2,2,"concat",4,32,"conversion_date_time",32,"conversionDateTime",32,"inputs",1,2,42,2,36,0,36,3,2,"keys",1,36,3,2,"values",1,33,1,36,5,2,"length",1,31,31,36,7,36,6,16,40,30,36,4,36,6,45,37,8,36,5,36,6,45,37,9,36,2,36,8,36,9,46,36,6,33,1,6,37,6,39,-37,35,35,35,35,35,35,35,36,1,2,"empty",1,5,40,7,36,2,32,"user_identifiers",36,1,46,32,"conversionValue",32,"inputs",1,2,2,"empty",1,5,40,11,36,2,32,"conversion_value",32,"conversionValue",32,"inputs",1,2,46,32,"currencyCode",32,"inputs",1,2,2,"empty",1,5,40,11,36,2,32,"currency_code",32,"currencyCode",32,"inputs",1,2,46,32,"orderId",32,"inputs",1,2,2,"empty",1,5,40,11,36,2,32,"order_id",32,"orderId",32,"inputs",1,2,46,32,"https://googleads.googleapis.com/v24/customers/",32,"/",32,"customerId",32,"inputs",1,2,2,"splitByString",2,33,1,45,32,":uploadClickConversions",2,"concat",3,32,"method",32,"POST",32,"headers",32,"Authorization",32,"Bearer ",32,"access_token",32,"oauth",32,"inputs",1,3,2,"concat",2,32,"Content-Type",32,"application/json",32,"login-customer-id",32,"/",32,"customerId",32,"inputs",1,2,2,"splitByString",2,33,2,45,42,3,32,"body",32,"conversions",36,2,43,1,32,"partialFailure",29,42,2,42,3,2,"fetch",2,33,400,36,3,32,"status",45,14,40,21,32,"Error from googleads.googleapis.com (status ",36,3,32,"status",45,32,"): ",36,3,32,"body",45,2,"concat",4,2,"Error",1,49,36,3,38,35,35,53,0,43,0,32,"email",32,"inputs",1,2,2,"empty",1,5,40,35,32,"email",32,"inputs",1,2,36,3,54,1,36,9,2,"empty",1,5,40,16,36,8,32,"hashed_email",36,9,2,"sha256Hex",1,42,1,2,"arrayPushBack",2,37,8,35,32,"phone",32,"inputs",1,2,2,"empty",1,5,40,35,32,"phone",32,"inputs",1,2,36,4,54,1,36,9,2,"empty",1,5,40,16,36,8,32,"hashed_phone_number",36,9,2,"sha256Hex",1,42,1,2,"arrayPushBack",2,37,8,35,32,"gclid",32,"inputs",1,2,47,3,35,32,"",2,"toString",1,2,"trim",1,32,"gbraid",32,"inputs",1,2,47,3,35,32,"",2,"toString",1,2,"trim",1,32,"wbraid",32,"inputs",1,2,47,3,35,32,"",2,"toString",1,2,"trim",1,42,0,36,9,2,"empty",1,5,40,24,36,12,32,"gclid",36,9,46,36,10,2,"empty",1,5,40,7,36,12,32,"gbraid",36,10,46,39,32,36,10,2,"empty",1,5,40,9,36,12,32,"gbraid",36,10,46,39,15,36,11,2,"empty",1,5,40,7,36,12,32,"wbraid",36,11,46,36,12,2,"empty",1,36,8,2,"empty",1,3,2,40,8,32,"No click ID or user identifiers. Skipping...",2,"print",1,35,31,38,36,12,36,8,36,7,54,2,36,13,36,5,54,1,36,12,32,"gclid",45,2,"empty",1,5,36,12,32,"gbraid",45,2,"empty",1,5,36,14,32,"VALUE_MUST_BE_UNSET",32,"UNPARSEABLE_GBRAID",32,"ONE_PER_CLICK_CONVERSION_ACTION_NOT_PERMITTED_WITH_BRAID",43,3,36,6,54,2,3,3,40,47,32,"Google refused the gbraid (",36,14,32,", ",2,"arrayStringConcat",2,32,"). Retrying with the gclid only.",2,"concat",3,2,"print",1,35,32,"gclid",36,12,32,"gclid",45,42,1,37,12,36,12,36,8,36,7,54,2,37,13,36,13,36,5,54,1,37,14,36,12,2,"empty",1,5,36,8,2,"empty",1,5,36,14,36,0,36,6,54,2,3,3,40,38,32,"Google rejected the click ID (",36,14,32,", ",2,"arrayStringConcat",2,32,"). Retrying with hashed email/phone only.",2,"concat",3,2,"print",1,35,42,0,36,8,36,7,54,2,37,13,36,13,36,5,54,1,37,14,39,60,36,12,2,"empty",1,5,36,8,2,"empty",1,5,36,14,36,1,36,6,54,2,3,3,40,36,32,"Google rejected the hashed email/phone (",36,14,32,", ",2,"arrayStringConcat",2,32,"). Retrying with the click ID only.",2,"concat",3,2,"print",1,35,36,12,43,0,36,7,54,2,37,13,36,13,36,5,54,1,37,14,36,13,32,"body",45,32,"partialFailureError",45,2,"empty",1,40,2,31,38,36,14,32,"CLICK_NOT_FOUND",43,1,36,6,54,2,40,8,32,"Google could not match the hashed email/phone to an ad click. The conversion was not recorded.",2,"print",1,35,31,38,36,14,36,2,36,6,54,2,40,8,32,"Google already recorded this conversion. Skipping...",2,"print",1,35,31,38,32,"Error from googleads.googleapis.com (status ",36,13,32,"status",45,32,"): ",36,13,32,"body",45,32,"partialFailureError",45,32,"message",45,2,"concat",4,2,"Error",1,49,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35]diff --git a/nodejs/tests/fixtures/hog-bytecode/a108d960c84c31cf3fd4f6c463f6f3533917a932c8bed8eebd1453d93f06b245.json b/nodejs/tests/fixtures/hog-bytecode/a108d960c84c31cf3fd4f6c463f6f3533917a932c8bed8eebd1453d93f06b245.jsonnew file mode 100644index 000000000000..484f02fec5ee--- /dev/null+++ b/nodejs/tests/fixtures/hog-bytecode/a108d960c84c31cf3fd4f6c463f6f3533917a932c8bed8eebd1453d93f06b245.json@@ -0,0 +1 @@+["_H",1,32,"UNPARSEABLE_GCLID",32,"UNPARSEABLE_GBRAID",32,"UNPARSEABLE_WBRAID",32,"EXPIRED_EVENT",32,"EVENT_NOT_FOUND",32,"CONVERSION_PRECEDES_EVENT",32,"INVALID_CUSTOMER_FOR_CLICK",32,"UNAUTHORIZED_CUSTOMER",32,"ONE_PER_CLICK_CONVERSION_ACTION_NOT_PERMITTED_WITH_BRAID",43,9,32,"INVALID_USER_IDENTIFIER",32,"UNSUPPORTED_USER_IDENTIFIER",32,"CUSTOMER_NOT_ACCEPTED_CUSTOMER_DATA_TERMS",32,"CUSTOMER_DATA_POLICY_PROHIBITS_ENHANCED_CONVERSIONS",32,"CUSTOMER_NOT_ENABLED_ENHANCED_CONVERSIONS_FOR_LEADS",43,5,32,"ORDER_ID_ALREADY_IN_USE",32,"CLICK_CONVERSION_ALREADY_EXISTS",43,2,52,"normalizeEmail",1,0,100,36,0,2,"trim",1,32," ",32,"",2,"replaceAll",3,2,"lower",1,32,"@",36,1,2,"splitByString",2,33,2,36,2,2,"length",1,12,36,2,33,1,45,2,"empty",1,36,2,33,2,45,2,"empty",1,4,3,40,2,31,38,32,"gmail.com",36,2,33,2,45,11,32,"googlemail.com",36,2,33,2,45,11,4,2,40,23,36,2,33,1,45,32,".",32,"",2,"replaceAll",3,32,"@",36,2,33,2,45,2,"concat",3,38,36,1,38,35,35,53,0,52,"normalizePhone",1,0,108,36,0,2,"trim",1,32," ",32,"-",32,".",32,"(",32,")",43,5,36,2,2,"values",1,33,1,36,3,2,"length",1,31,36,5,36,4,16,40,27,36,3,36,4,45,37,6,36,1,36,6,32,"",2,"replaceAll",3,37,1,36,4,33,1,6,37,4,39,-34,35,35,35,35,35,36,1,32,"00",2,"startsWith",2,40,14,32,"+",36,1,33,3,2,"substring",2,2,"concat",2,37,1,36,1,32,"^[+][1-9][0-9]{6,14}$",2,"match",2,5,40,2,31,38,36,1,38,35,53,0,52,"uploadErrorCodes",1,0,145,43,0,36,0,32,"body",45,32,"partialFailureError",45,32,"details",45,47,3,35,43,0,36,2,2,"values",1,33,1,36,3,2,"length",1,31,36,5,36,4,16,40,98,36,3,36,4,45,37,6,36,6,32,"errors",45,47,3,35,43,0,36,7,2,"values",1,33,1,36,8,2,"length",1,31,36,10,36,9,16,40,47,36,8,36,9,45,37,11,36,1,36,11,32,"errorCode",45,32,"conversionUploadError",45,47,9,35,36,11,32,"errorCode",45,32,"fieldError",45,47,3,35,32,"OTHER",2,"arrayPushBack",2,37,1,36,9,33,1,6,37,9,39,-54,35,35,35,35,35,36,4,33,1,6,37,4,39,-105,35,35,35,35,35,36,1,38,35,53,0,52,"allIn",2,0,66,36,0,2,"empty",1,40,2,30,38,36,0,36,2,2,"values",1,33,1,36,3,2,"length",1,31,36,5,36,4,16,40,28,36,3,36,4,45,37,6,36,1,36,6,2,"has",2,5,40,2,30,38,36,4,33,1,6,37,4,39,-35,35,35,35,35,35,29,38,53,0,52,"upload",2,0,306,32,"conversion_action",32,"customers/",32,"/",32,"customerId",32,"inputs",1,2,2,"splitByString",2,33,1,45,32,"/conversionActions/",32,"conversionActionId",32,"inputs",1,2,2,"concat",4,32,"conversion_date_time",32,"conversionDateTime",32,"inputs",1,2,42,2,36,0,36,3,2,"keys",1,36,3,2,"values",1,33,1,36,5,2,"length",1,31,31,36,7,36,6,16,40,30,36,4,36,6,45,37,8,36,5,36,6,45,37,9,36,2,36,8,36,9,46,36,6,33,1,6,37,6,39,-37,35,35,35,35,35,35,35,36,1,2,"empty",1,5,40,7,36,2,32,"user_identifiers",36,1,46,32,"conversionValue",32,"inputs",1,2,2,"empty",1,5,40,11,36,2,32,"conversion_value",32,"conversionValue",32,"inputs",1,2,46,32,"currencyCode",32,"inputs",1,2,2,"empty",1,5,40,11,36,2,32,"currency_code",32,"currencyCode",32,"inputs",1,2,46,32,"orderId",32,"inputs",1,2,2,"empty",1,5,40,11,36,2,32,"order_id",32,"orderId",32,"inputs",1,2,46,32,"https://googleads.googleapis.com/v24/customers/",32,"/",32,"customerId",32,"inputs",1,2,2,"splitByString",2,33,1,45,32,":uploadClickConversions",2,"concat",3,32,"method",32,"POST",32,"headers",32,"Authorization",32,"Bearer ",32,"access_token",32,"oauth",32,"inputs",1,3,2,"concat",2,32,"Content-Type",32,"application/json",32,"login-customer-id",32,"/",32,"customerId",32,"inputs",1,2,2,"splitByString",2,33,2,45,42,3,32,"body",32,"conversions",36,2,43,1,32,"partialFailure",29,42,2,42,3,2,"fetch",2,33,400,36,3,32,"status",45,14,40,21,32,"Error from googleads.googleapis.com (status ",36,3,32,"status",45,32,"): ",36,3,32,"body",45,2,"concat",4,2,"Error",1,49,36,3,38,35,35,53,0,43,0,32,"email",32,"inputs",1,2,2,"empty",1,5,40,35,32,"email",32,"inputs",1,2,36,3,54,1,36,9,2,"empty",1,5,40,16,36,8,32,"hashed_email",36,9,2,"sha256Hex",1,42,1,2,"arrayPushBack",2,37,8,35,32,"phone",32,"inputs",1,2,2,"empty",1,5,40,35,32,"phone",32,"inputs",1,2,36,4,54,1,36,9,2,"empty",1,5,40,16,36,8,32,"hashed_phone_number",36,9,2,"sha256Hex",1,42,1,2,"arrayPushBack",2,37,8,35,42,0,32,"gclid",32,"inputs",1,2,2,"empty",1,5,40,36,36,9,32,"gclid",32,"gclid",32,"inputs",1,2,46,32,"gbraid",32,"inputs",1,2,2,"empty",1,5,40,11,36,9,32,"gbraid",32,"gbraid",32,"inputs",1,2,46,39,48,32,"gbraid",32,"inputs",1,2,2,"empty",1,5,40,13,36,9,32,"gbraid",32,"gbraid",32,"inputs",1,2,46,39,23,32,"wbraid",32,"inputs",1,2,2,"empty",1,5,40,11,36,9,32,"wbraid",32,"wbraid",32,"inputs",1,2,46,36,9,2,"empty",1,36,8,2,"empty",1,3,2,40,8,32,"No click ID or user identifiers. Skipping...",2,"print",1,35,31,38,36,9,36,8,36,7,54,2,36,10,36,5,54,1,36,9,32,"gclid",45,2,"empty",1,5,36,9,32,"gbraid",45,2,"empty",1,5,36,11,32,"VALUE_MUST_BE_UNSET",43,1,36,6,54,2,3,3,40,35,32,"Google refused the gclid and gbraid together. Retrying with the gclid only.",2,"print",1,35,32,"gclid",36,9,32,"gclid",45,42,1,37,9,36,9,36,8,36,7,54,2,37,10,36,10,36,5,54,1,37,11,36,9,2,"empty",1,5,36,8,2,"empty",1,5,36,11,36,0,36,6,54,2,3,3,40,38,32,"Google rejected the click ID (",36,11,32,", ",2,"arrayStringConcat",2,32,"). Retrying with hashed email/phone only.",2,"concat",3,2,"print",1,35,42,0,36,8,36,7,54,2,37,10,36,10,36,5,54,1,37,11,39,60,36,9,2,"empty",1,5,36,8,2,"empty",1,5,36,11,36,1,36,6,54,2,3,3,40,36,32,"Google rejected the hashed email/phone (",36,11,32,", ",2,"arrayStringConcat",2,32,"). Retrying with the click ID only.",2,"concat",3,2,"print",1,35,36,9,43,0,36,7,54,2,37,10,36,10,36,5,54,1,37,11,36,10,32,"body",45,32,"partialFailureError",45,2,"empty",1,40,2,31,38,36,11,32,"CLICK_NOT_FOUND",43,1,36,6,54,2,40,8,32,"Google could not match the hashed email/phone to an ad click. The conversion was not recorded.",2,"print",1,35,31,38,36,11,36,2,36,6,54,2,40,8,32,"Google already recorded this conversion. Skipping...",2,"print",1,35,31,38,32,"Error from googleads.googleapis.com (status ",36,10,32,"status",45,32,"): ",36,10,32,"body",45,32,"partialFailureError",45,32,"message",45,2,"concat",4,2,"Error",1,49,35,35,35,35,35,35,35,35,35,35,35,35]diff --git a/nodejs/tests/fixtures/hog-bytecode/b53badcaecf6c7caef9275826f049f18f0842b6ccefe87b601e9fbc7c6b55429.json b/nodejs/tests/fixtures/hog-bytecode/b53badcaecf6c7caef9275826f049f18f0842b6ccefe87b601e9fbc7c6b55429.jsonnew file mode 100644index 000000000000..7fa64748d0af--- /dev/null+++ b/nodejs/tests/fixtures/hog-bytecode/b53badcaecf6c7caef9275826f049f18f0842b6ccefe87b601e9fbc7c6b55429.json@@ -0,0 +1 @@+["_H",1,32,"gbraid",32,"properties",32,"person",1,3,47,9,35,32,"$initial_gbraid",32,"properties",32,"person",1,3,38]diff --git a/nodejs/tests/fixtures/hog-bytecode/e2c9d6493c7bffdeedfa78a33729e03f5007d5d5c77c9cf697c278fa33ae6b4b.json b/nodejs/tests/fixtures/hog-bytecode/e2c9d6493c7bffdeedfa78a33729e03f5007d5d5c77c9cf697c278fa33ae6b4b.jsonnew file mode 100644index 000000000000..2bb00a4e7f1a--- /dev/null+++ b/nodejs/tests/fixtures/hog-bytecode/e2c9d6493c7bffdeedfa78a33729e03f5007d5d5c77c9cf697c278fa33ae6b4b.json@@ -0,0 +1 @@+["_H",1,32,"UNPARSEABLE_GCLID",32,"UNPARSEABLE_GBRAID",32,"UNPARSEABLE_WBRAID",32,"EXPIRED_EVENT",32,"EVENT_NOT_FOUND",32,"CONVERSION_PRECEDES_EVENT",32,"INVALID_CUSTOMER_FOR_CLICK",32,"UNAUTHORIZED_CUSTOMER",32,"ONE_PER_CLICK_CONVERSION_ACTION_NOT_PERMITTED_WITH_BRAID",43,9,32,"INVALID_USER_IDENTIFIER",32,"UNSUPPORTED_USER_IDENTIFIER",32,"CUSTOMER_NOT_ACCEPTED_CUSTOMER_DATA_TERMS",32,"CUSTOMER_DATA_POLICY_PROHIBITS_ENHANCED_CONVERSIONS",32,"CUSTOMER_NOT_ENABLED_ENHANCED_CONVERSIONS_FOR_LEADS",43,5,32,"ORDER_ID_ALREADY_IN_USE",32,"CLICK_CONVERSION_ALREADY_EXISTS",43,2,52,"normalizeEmail",1,0,100,36,0,2,"trim",1,32," ",32,"",2,"replaceAll",3,2,"lower",1,32,"@",36,1,2,"splitByString",2,33,2,36,2,2,"length",1,12,36,2,33,1,45,2,"empty",1,36,2,33,2,45,2,"empty",1,4,3,40,2,31,38,32,"gmail.com",36,2,33,2,45,11,32,"googlemail.com",36,2,33,2,45,11,4,2,40,23,36,2,33,1,45,32,".",32,"",2,"replaceAll",3,32,"@",36,2,33,2,45,2,"concat",3,38,36,1,38,35,35,53,0,52,"normalizePhone",1,0,129,36,0,2,"trim",1,32," ",32,"-",32,".",32,"(",32,")",43,5,36,2,2,"values",1,33,1,36,3,2,"length",1,31,36,5,36,4,16,40,27,36,3,36,4,45,37,6,36,1,36,6,32,"",2,"replaceAll",3,37,1,36,4,33,1,6,37,4,39,-34,35,35,35,35,35,36,1,32,"00",2,"startsWith",2,40,16,32,"+",36,1,33,3,2,"substring",2,2,"concat",2,37,1,39,19,36,1,32,"+",2,"startsWith",2,5,40,9,32,"+",36,1,2,"concat",2,37,1,36,1,32,"^[+][1-9][0-9]{6,14}$",2,"match",2,5,40,2,31,38,36,1,38,35,53,0,52,"uploadErrorCodes",1,0,134,43,0,36,0,32,"body",45,32,"partialFailureError",45,32,"details",45,47,3,35,43,0,36,2,2,"values",1,33,1,36,3,2,"length",1,31,36,5,36,4,16,40,87,36,3,36,4,45,37,6,36,6,32,"errors",45,47,3,35,43,0,36,7,2,"values",1,33,1,36,8,2,"length",1,31,36,10,36,9,16,40,36,36,8,36,9,45,37,11,36,1,36,11,32,"errorCode",45,32,"conversionUploadError",45,47,3,35,32,"OTHER",2,"arrayPushBack",2,37,1,36,9,33,1,6,37,9,39,-43,35,35,35,35,35,36,4,33,1,6,37,4,39,-94,35,35,35,35,35,36,1,38,35,53,0,52,"allIn",2,0,66,36,0,2,"empty",1,40,2,30,38,36,0,36,2,2,"values",1,33,1,36,3,2,"length",1,31,36,5,36,4,16,40,28,36,3,36,4,45,37,6,36,1,36,6,2,"has",2,5,40,2,30,38,36,4,33,1,6,37,4,39,-35,35,35,35,35,35,29,38,53,0,52,"upload",2,0,306,32,"conversion_action",32,"customers/",32,"/",32,"customerId",32,"inputs",1,2,2,"splitByString",2,33,1,45,32,"/conversionActions/",32,"conversionActionId",32,"inputs",1,2,2,"concat",4,32,"conversion_date_time",32,"conversionDateTime",32,"inputs",1,2,42,2,36,0,36,3,2,"keys",1,36,3,2,"values",1,33,1,36,5,2,"length",1,31,31,36,7,36,6,16,40,30,36,4,36,6,45,37,8,36,5,36,6,45,37,9,36,2,36,8,36,9,46,36,6,33,1,6,37,6,39,-37,35,35,35,35,35,35,35,36,1,2,"empty",1,5,40,7,36,2,32,"user_identifiers",36,1,46,32,"conversionValue",32,"inputs",1,2,2,"empty",1,5,40,11,36,2,32,"conversion_value",32,"conversionValue",32,"inputs",1,2,46,32,"currencyCode",32,"inputs",1,2,2,"empty",1,5,40,11,36,2,32,"currency_code",32,"currencyCode",32,"inputs",1,2,46,32,"orderId",32,"inputs",1,2,2,"empty",1,5,40,11,36,2,32,"order_id",32,"orderId",32,"inputs",1,2,46,32,"https://googleads.googleapis.com/v24/customers/",32,"/",32,"customerId",32,"inputs",1,2,2,"splitByString",2,33,1,45,32,":uploadClickConversions",2,"concat",3,32,"method",32,"POST",32,"headers",32,"Authorization",32,"Bearer ",32,"access_token",32,"oauth",32,"inputs",1,3,2,"concat",2,32,"Content-Type",32,"application/json",32,"login-customer-id",32,"/",32,"customerId",32,"inputs",1,2,2,"splitByString",2,33,2,45,42,3,32,"body",32,"conversions",36,2,43,1,32,"partialFailure",29,42,2,42,3,2,"fetch",2,33,400,36,3,32,"status",45,14,40,21,32,"Error from googleads.googleapis.com (status ",36,3,32,"status",45,32,"): ",36,3,32,"body",45,2,"concat",4,2,"Error",1,49,36,3,38,35,35,53,0,43,0,32,"email",32,"inputs",1,2,2,"empty",1,5,40,35,32,"email",32,"inputs",1,2,36,3,54,1,36,9,2,"empty",1,5,40,16,36,8,32,"hashed_email",36,9,2,"sha256Hex",1,42,1,2,"arrayPushBack",2,37,8,35,32,"phone",32,"inputs",1,2,2,"empty",1,5,40,35,32,"phone",32,"inputs",1,2,36,4,54,1,36,9,2,"empty",1,5,40,16,36,8,32,"hashed_phone_number",36,9,2,"sha256Hex",1,42,1,2,"arrayPushBack",2,37,8,35,42,0,32,"gclid",32,"inputs",1,2,2,"empty",1,5,40,36,36,9,32,"gclid",32,"gclid",32,"inputs",1,2,46,32,"gbraid",32,"inputs",1,2,2,"empty",1,5,40,11,36,9,32,"gbraid",32,"gbraid",32,"inputs",1,2,46,39,48,32,"gbraid",32,"inputs",1,2,2,"empty",1,5,40,13,36,9,32,"gbraid",32,"gbraid",32,"inputs",1,2,46,39,23,32,"wbraid",32,"inputs",1,2,2,"empty",1,5,40,11,36,9,32,"wbraid",32,"wbraid",32,"inputs",1,2,46,36,9,2,"empty",1,36,8,2,"empty",1,3,2,40,8,32,"No click ID or user identifiers. Skipping...",2,"print",1,35,31,38,36,9,36,8,36,7,54,2,36,10,36,5,54,1,36,9,2,"empty",1,5,36,8,2,"empty",1,5,36,11,36,0,36,6,54,2,3,3,40,38,32,"Google rejected the click ID (",36,11,32,", ",2,"arrayStringConcat",2,32,"). Retrying with hashed email/phone only.",2,"concat",3,2,"print",1,35,42,0,36,8,36,7,54,2,37,10,36,10,36,5,54,1,37,11,39,60,36,9,2,"empty",1,5,36,8,2,"empty",1,5,36,11,36,1,36,6,54,2,3,3,40,36,32,"Google rejected the hashed email/phone (",36,11,32,", ",2,"arrayStringConcat",2,32,"). Retrying with the click ID only.",2,"concat",3,2,"print",1,35,36,9,43,0,36,7,54,2,37,10,36,10,36,5,54,1,37,11,36,10,32,"body",45,32,"partialFailureError",45,2,"empty",1,40,2,31,38,36,11,32,"CLICK_NOT_FOUND",43,1,36,6,54,2,40,8,32,"Google could not match the hashed email/phone to an ad click. The conversion was not recorded.",2,"print",1,35,31,38,36,11,36,2,36,6,54,2,40,8,32,"Google already recorded this conversion. Skipping...",2,"print",1,35,31,38,32,"Error from googleads.googleapis.com (status ",36,10,32,"status",45,32,"): ",36,10,32,"body",45,32,"partialFailureError",45,32,"message",45,2,"concat",4,2,"Error",1,49,35,35,35,35,35,35,35,35,35,35,35,35]diff --git a/nodejs/tests/fixtures/hog-bytecode/f8f6946c9b235ff518ca20af690fae459bef5b0481be3d06cea7daef0992d3f8.json b/nodejs/tests/fixtures/hog-bytecode/f8f6946c9b235ff518ca20af690fae459bef5b0481be3d06cea7daef0992d3f8.jsonnew file mode 100644index 000000000000..e4690797ec7b--- /dev/null+++ b/nodejs/tests/fixtures/hog-bytecode/f8f6946c9b235ff518ca20af690fae459bef5b0481be3d06cea7daef0992d3f8.json@@ -0,0 +1 @@+["_H",1,32,"wbraid",32,"properties",32,"person",1,3,47,9,35,32,"$initial_wbraid",32,"properties",32,"person",1,3,38]