Cara menggunakan javascript event target contains

Post-engagement attribution windows: Select the time window for crediting Twitter with conversions that happen after a person engages with your ads. Some examples of engagement can include likes, Retweets, follows, replies, or URL clicks. 

The options for post-engagement attribution windows are 1, 2, 3, 5, 7, 14, and 30 days. If you’re not sure which window to select, we recommend the default setting of 30 days. If you change this setting, your conversion data will be retroactively updated, so feel free to come back later and experiment with different attribution windows.

Post-view attribution window: “Post-view” refers to when someone on Twitter sees your Promoted Ad and does not engage with it, but later visits your website and converts. People on Twitter often see, read, and view media in your Promoted Ads without clicking on them. As such, including post-view attribution gives you insight into conversions you received but weren’t actually charged an engagement for.

The options for post-view attribution windows are Off, 1, 2, 3, 5, 7, 14, and 30 days. If you’re not sure which setting to choose, we recommend the default of “1 day after view”.

Each time the Pixel loads, it automatically calls fbq('track', 'PageView') to track a PageView standard event. PageView standard events record the referrer URL of the page that triggered the function call. You can use these recorded URLs in the Events Manager to define visitor actions that should be tracked.

For example, let's say that you send visitors who subscribe to your mailing list to a thank you page. You could set up a custom conversion that tracks website visitors who have viewed any page that has /thank-you in its URL. Assuming your thank you page is the only page with /thank-you in its URL, and you've installed the Pixel on that page, anyone who views it will be tracked using that custom conversion.

Once tracked, custom conversions can be used to optimize your ad campaigns, to define custom audiences, and to further refine custom audiences that rely on standard or custom events. Learn more about custom conversions with Blueprint.

Since custom conversions rely on complete or partial URLs, you should make sure that you can define visitor actions exclusively based on unique strings in your website URLs.

Creating Custom Conversions

Custom conversions are created entirely within the Events Manager. Refer to our Advertiser Help document to learn how.

Rule-Based Custom Conversions

Optimize for actions and track them without adding anything to your Meta Pixel base code. You can do this beyond the 9 standard events.

  1. Create a custom conversion at /{AD_ACCOUNT_ID}/customconversions.
  2. Specify a URL, or partial URL, representing an event in
    from facebookads.adobjects.customconversion import CustomConversion
    
        custom_conversion = CustomConversion(parent_id='act_')
        custom_conversion.update({
            CustomConversion.Field.name: 'Example Custom Conversion',
            CustomConversion.Field.pixel_id: ,
            CustomConversion.Field.pixel_rule: {
                'url': {'i_contains': 'thankyou.html'},
            },
            CustomConversion.Field.custom_event_type: 'PURCHASE',
        })
    
        custom_conversion.remote_create()
    0. For example,
    from facebookads.adobjects.customconversion import CustomConversion
    
        custom_conversion = CustomConversion(parent_id='act_')
        custom_conversion.update({
            CustomConversion.Field.name: 'Example Custom Conversion',
            CustomConversion.Field.pixel_id: ,
            CustomConversion.Field.pixel_rule: {
                'url': {'i_contains': 'thankyou.html'},
            },
            CustomConversion.Field.custom_event_type: 'PURCHASE',
        })
    
        custom_conversion.remote_create()
    1 is a page appearing after purchase.

This records a

from facebookads.adobjects.customconversion import CustomConversion

    custom_conversion = CustomConversion(parent_id='act_')
    custom_conversion.update({
        CustomConversion.Field.name: 'Example Custom Conversion',
        CustomConversion.Field.pixel_id: ,
        CustomConversion.Field.pixel_rule: {
            'url': {'i_contains': 'thankyou.html'},
        },
        CustomConversion.Field.custom_event_type: 'PURCHASE',
    })

    custom_conversion.remote_create()
2 conversion when
from facebookads.adobjects.customconversion import CustomConversion

    custom_conversion = CustomConversion(parent_id='act_')
    custom_conversion.update({
        CustomConversion.Field.name: 'Example Custom Conversion',
        CustomConversion.Field.pixel_id: ,
        CustomConversion.Field.pixel_rule: {
            'url': {'i_contains': 'thankyou.html'},
        },
        CustomConversion.Field.custom_event_type: 'PURCHASE',
    })

    custom_conversion.remote_create()
3 displays:

PHP Business SDKPython Business SDKcURL

use FacebookAds\Object\CustomConversion;
use FacebookAds\Object\Fields\CustomConversionFields;

$custom_conversion = new CustomConversion(null, 'act_');
$custom_conversion->setData(array(
  CustomConversionFields::NAME => 'Example Custom conversion',
  CustomConversionFields::PIXEL_ID => ,
  CustomConversionFields::PIXEL_RULE => array(
    'url' => array('i_contains' => 'thank-you.html'),
  ),
  CustomConversionFields::CUSTOM_EVENT_TYPE => 'PURCHASE',
));
$custom_conversion->create();
from facebookads.adobjects.customconversion import CustomConversion

    custom_conversion = CustomConversion(parent_id='act_')
    custom_conversion.update({
        CustomConversion.Field.name: 'Example Custom Conversion',
        CustomConversion.Field.pixel_id: ,
        CustomConversion.Field.pixel_rule: {
            'url': {'i_contains': 'thankyou.html'},
        },
        CustomConversion.Field.custom_event_type: 'PURCHASE',
    })

    custom_conversion.remote_create()
curl \
  -F 'name=Example Custom conversion' \
  -F 'pixel_id=' \
  -F 'pixel_rule={"url":{"i_contains":"thank-you.html"}}' \
  -F 'custom_event_type=PURCHASE' \
  -F 'access_token=' \
  https://graph.facebook.com/v2.8/act_/customconversions

You can then create your campaign using the

from facebookads.adobjects.customconversion import CustomConversion

    custom_conversion = CustomConversion(parent_id='act_')
    custom_conversion.update({
        CustomConversion.Field.name: 'Example Custom Conversion',
        CustomConversion.Field.pixel_id: ,
        CustomConversion.Field.pixel_rule: {
            'url': {'i_contains': 'thankyou.html'},
        },
        CustomConversion.Field.custom_event_type: 'PURCHASE',
    })

    custom_conversion.remote_create()
4 objective.

At the ad set level, specify the same custom conversion (

from facebookads.adobjects.customconversion import CustomConversion

    custom_conversion = CustomConversion(parent_id='act_')
    custom_conversion.update({
        CustomConversion.Field.name: 'Example Custom Conversion',
        CustomConversion.Field.pixel_id: ,
        CustomConversion.Field.pixel_rule: {
            'url': {'i_contains': 'thankyou.html'},
        },
        CustomConversion.Field.custom_event_type: 'PURCHASE',
    })

    custom_conversion.remote_create()
5,
from facebookads.adobjects.customconversion import CustomConversion

    custom_conversion = CustomConversion(parent_id='act_')
    custom_conversion.update({
        CustomConversion.Field.name: 'Example Custom Conversion',
        CustomConversion.Field.pixel_id: ,
        CustomConversion.Field.pixel_rule: {
            'url': {'i_contains': 'thankyou.html'},
        },
        CustomConversion.Field.custom_event_type: 'PURCHASE',
    })

    custom_conversion.remote_create()
0,
from facebookads.adobjects.customconversion import CustomConversion

    custom_conversion = CustomConversion(parent_id='act_')
    custom_conversion.update({
        CustomConversion.Field.name: 'Example Custom Conversion',
        CustomConversion.Field.pixel_id: ,
        CustomConversion.Field.pixel_rule: {
            'url': {'i_contains': 'thankyou.html'},
        },
        CustomConversion.Field.custom_event_type: 'PURCHASE',
    })

    custom_conversion.remote_create()
7) in
from facebookads.adobjects.customconversion import CustomConversion

    custom_conversion = CustomConversion(parent_id='act_')
    custom_conversion.update({
        CustomConversion.Field.name: 'Example Custom Conversion',
        CustomConversion.Field.pixel_id: ,
        CustomConversion.Field.pixel_rule: {
            'url': {'i_contains': 'thankyou.html'},
        },
        CustomConversion.Field.custom_event_type: 'PURCHASE',
    })

    custom_conversion.remote_create()
8.

Custom Conversions Insights

Ads Insights returns information about Custom Conversions:

curl -i -G \
-d 'fields=actions,action_values' \
-d 'access_token=' \
https://graph.facebook.com/v2.7//insights

Returns both standard and custom conversions:

{
  "data": [
    {
      "actions": [
        {
          "action_type": "offsite_conversion.custom.17067367629523",
          "value": 1225
        },
        {
          "action_type": "offsite_conversion.fb_pixel_purchase",
          "value": 205
        }
      ],
      "action_values": [
        {
          "action_type": "offsite_conversion.custom.1706736762929507",
          "value": 29390.89
        },
        {
          "action_type": "offsite_conversion.fb_pixel_purchase",
          "value": 29390.89
        }
      ],
      "date_start": "2016-07-28",
      "date_stop": "2016-08-26"
    }
  ],
  "paging": {
    "cursors": {
      "before": "MAZDZD",
      "after": "MjQZD"
    },
    "next": "https://graph.facebook.com/v2.7//insights?access_token=&pretty=0&fields=actions%2Caction_values&date_preset=last_30_days&level=adset&limit=25&after=MjQZD"
  }
}

Custom conversions have unique IDs; query it for a specific conversion, such as a rule-based one:

curl -i -G \
-d 'fields=name,pixel,pixel_aggregation_rule' \
-d 'access_token=ACCESS-TOKEN' \
https://graph.facebook.com/v2.7/

Custom Conversions Limitations

The maximum number of custom conversions per ad account is 100. If you use Ads Insights API to get metrics on custom conversions: