File size: 1,147 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
import { debug, TRACKING_IDS } from './constants';
// Ensure setup has run.
import './setup';
/**
* Fire custom facebook conversion tracking event.
* @param {string} name - The name of the custom event.
* @param {Object} properties - The custom event attributes.
* @returns {void}
*/
export function trackCustomFacebookConversionEvent( name, properties ) {
window.fbq && window.fbq( 'trackSingleCustom', TRACKING_IDS.facebookInit, name, properties );
}
/**
* Fire custom adwords conversation tracking event.
* @param {Object} properties - The custom event attributes.
* @returns {void}
*/
export function trackCustomAdWordsRemarketingEvent( properties ) {
debug( 'trackCustomAdWordsRemarketingEvent:', properties );
// Not sure this is currently serving any purpose and whether we can convert it to use Gtag.
// Refactoring the middleware for analytics is outside the scope of this PR so I'll leave the function stub for now.
/*
window.google_trackConversion &&
window.google_trackConversion( {
google_conversion_id: ADWORDS_CONVERSION_ID,
google_custom_params: properties,
google_remarketing_only: true,
} );
*/
}
|