Thankyou page code

Change 'thank-you.html'), for your URL based on your thank you page
mail@pastecode.io avatar
unknown
plain_text
7 months ago
509 B
5
Indexable
Never
use FacebookAds\Object\CustomConversion;
use FacebookAds\Object\Fields\CustomConversionFields;

$custom_conversion = new CustomConversion(null, 'act_<1411958792952509>');
$custom_conversion->setData(array(
  CustomConversionFields::NAME => 'Conversion',
  CustomConversionFields::PIXEL_ID => <276085624839261>,
  CustomConversionFields::PIXEL_RULE => array(
    'url' => array('i_contains' => 'thank-you.html'),
  ),
  CustomConversionFields::CUSTOM_EVENT_TYPE => 'PURCHASE',
));
$custom_conversion->create();