筛选项

回传宏&功能

概述

以下列表显示 Branch 在 Postback URL 和 Webhooks 中支持的宏和可用功能。当您使用这些宏和函数时,Branch 会在通知指定的回传 URL 之前动态解析/替换它们的相应值。

URL 宏

我们已根据要收集的信息类型对宏进行了分类。

📘

使用函数修改回传宏

您可以使用各种回传 URL 函数对所有回传宏进行哈希/加密/修改。有关适用于以下回传宏的可用回传 URL 函数的信息,请参见下面的 URL 函数宏(URL Function Macros)部分。

回传数据

以下宏表示与回传事件本身相关的高级数据点。

Macro

类型

描述

${(name)!}

String

The name of the postback event. The list of event names can be found here.

${(customer_event_alias)!}

String

The alias name of the event provided by the customer; used in addition to the standard Branch names defined in the namefield.

${(organization_id)!}

Fixed64

The ID associated with your organization for which the event occurred; assigned by Branch.

${(organization_name)!}

String

The name of your organization for which the event occurred; provided during account setup.

${(event_timestamp)!}

Fixed64

The UNIX timestamp in milliseconds for the event; set automatically server side.

${(origin)!}

String

Where the attribution was recorded:

  • branch
  • segment
  • mparticle
  • tune

${(id)!}

String

与事件相关的 ID;由 Branch 分配。

<#if attributed>    1<#else>    0</#if>

Boolean

事件是否被归因; 1 (true/yes) 或 0 (false/no)

${(days_from_last_attributed_touch_to_event)!}

Int32

最后归因触点和事件之间的天数。

${(hours_from_last_attributed_touch_to_event)!}

Int32

最后归因触点和事件之间的小时数;上限为24。

${(minutes_from_last_attributed_touch_to_event)!}

Int32

最后归因触点和事件之间的分钟数;上限为60。

${(seconds_from_last_attributed_touch_to_event)!}

Int32

最后归因触点和事件之间的秒数;上限为60。

${(last_attributed_touch_type)!}

String

The type of the attribution the event was for:

  • click
  • impression
  • impression
${(last_attributed_touch_timestamp)!}Fixed64最后归因触点的 UNIX 时间戳(以毫秒为单位);服务器端自动设置。
${(di_match_click_token)!}Fixed64Branch Flow ID,其被用于 Tune,Appsflyer 等以对点击与安装进行匹配,使用 Android install referrer;设置服务器端,由客户端中继。
${last_cta_view_timestamp)!}Fixed64上一次 Branch CTA 视图的 UNIX 时间戳(以毫秒为单位)。服务器端自动设置。
<#if deep_linked>1<#else>0</#if>Boolean当前的应用或 Web 会话是否导致用户被深度链接。服务器端自动设置;1 (true/yes) 或 0 (false/no)。
<#if first_event_for_user>1<#else>0</#if>Boolean对于此 Persona (同人用户),这是否是第一次触发此事件。服务器端自动设置;1 (true/yes) 或 0 (false/no)。
${(store_install_begin_timestamp)!}Fixed64在 Play Store / App Store 中点击安装按钮的时间。
${(referrer_click_timestamp)!}Fixed64Play Store 启动时间(仅适用于 Android)
<#if existing_user>1<#else>0</#if>Boolean与事件相关的用户是既存用户还是新用户; 1 (true/yes) 或 0 (false/no)
${(webhook_id)!}Fixed64The ID of the webhook/postback itself; assigned by Branch.
${(webhook_partner_key)!}StringBranch 发送有效负载的机器可读伙伴名称;服务器端自动设置。

归因触点数据

以下宏表示与广告 campaign 本身相关的数据点。

Macro

类型

描述

${(last_attributed_touch_data.~id)!}

Fixed64

最后归因触点 ID(仅适用于 Quick Link)。服务器端自动设置。

${(last_attributed_touch_data.~campaign)!}

String

为最后归因触点指定的 campaign(名称)。可以由客户端在链接上指定,或者在某些情况下可以在服务器端自动预填充。

${(last_attributed_touch_data.~campaign_id)!}

String

为最后归因触点指定的 campaign ID。服务器端自动设置。

${(last_attributed_touch_data.~campaign_type)!}

String

Google campaign 类型; Google AAP 字段。服务器端自动设置。

${(last_attributed_touch_data.~customer_campaign)!}

String

最后一次归因触点指定的客户 campaign。可以由客户在链接上指定。

${(last_attributed_touch_data.~channel)!}

String

为最后归因触点指定的渠道。可以由客户端在链接上指定,也可以在某些情况下自动在服务器端预先填充。

${(last_attributed_touch_data.~feature)!}

String

为最后归因触点指定的功能。可以由客户端在链接上指定,也可以在某些情况下自动在服务器端预先填充。

${(last_attributed_touch_data.~stage)!}

String

为最后归因触点指定的阶段。可以由客户端在链接上指定,也可以在某些情况下自动在服务器端预先填充。

${(last_attributed_touch_data.~tags)!}

String

为最后归因触点指定的标签。可以由客户端在链接上指定,也可以在某些情况下自动在服务器端预填充。

${(last_attributed_touch_data.~advertising_partner_name)!}

String

为最后归因触点指定的可读广告合作伙伴名称。服务器端自动设置。

${(last_attributed_touch_data.~advertising_partner_id)!}

String

The ID for the advertising partner specified for the last attributed touch. set automatically server side OR specified by the client.

${(last_attributed_touch_data.~secondary_publisher)!}

String

为最后归因触点指定的子发行商。由广告平台传递。

${(last_attributed_touch_data.~secondary_publisher_id)!}

String

为最后归因触点指定的子发行商 ID。由广告平台传递。

${(last_attributed_touch_data.~customer_secondary_publisher)!}

String

为最后归因触点指定的子发行商 ID。由广告平台传递。

${(last_attributed_touch_data.~creative_name)!}

String

为最后归因触点指定的广告素材名称。服务器端自动设置。

${(last_attributed_touch_data.~creative_id)!}

String

为最后归因触点指定的广告素材 ID。服务器端自动设置。

${(last_attributed_touch_data.~ad_set_name)!}

String

The ad set name specified for the last attributed touch. set automatically server side.

${(last_attributed_touch_data.~ad_set_id)!}

String

The ad set ID specified for the last attributed touch. set automatically server side.

${(last_attributed_touch_data.~customer_ad_set_name)!}

String

The customer ad set name specified for the last attributed touch. can be specified on links by the client.

${(last_attributed_touch_data.~ad_name)!}

String

The ad name specified for the last attributed touch. set automatically server side.

${(last_attributed_touch_data.~ad_id)!}

String

The ad ID specified for the last attributed touch. set automatically server side.

${(last_attributed_touch_data.~customer_ad_name)!}

String

上一次归因触点指定的客户广告名称。可以由客户端在链接上指定。

${(last_attributed_touch_data.~keyword)!}

String

The keyword specified for the last attributed touch. set automatically server side.

${(last_attributed_touch_data.~keyword_id)!}

String

The unique ID for keyword of the last touch as provided by Google.

${(last_attributed_touch_data.~customer_keyword)!}

String

最后一次触点的客户关键字。可以由客户端在链接上指定。

${(last_attributed_touch_data.~branch_ad_format)!}

String

最后触点的广告格式。在创建 Branch Link 时选择的广告格式,并将其设置为分析代码。例如,Search,Display,Product Ad,App only。

${(last_attributed_touch_data.~technology_partner)!}

String

最后触点的技术合作伙伴(带有分析标签)。除代理商外,用于促进 campaign 的任何第三方(例如,提供了受众,优化广告效果)。

${(last_attributed_touch_data.~banner_dimensions)!}

String

最后触点的显示横幅尺寸(带有分析标签)

${(last_attributed_touch_data.~placement)!}

String

上次触点的位置,由 Analytics 标签标记。实际显示 campaigns 的应用或网站。

${(last_attributed_touch_data.~placement_id)!}

String

上次触点的位置 ID,由 Analytics 标签设置。实际显示 campaigns 的应用或网站。

${(last_attributed_touch_data.~customer_placement)!}

String

The customer specified placement of the last touch, as set with an analytics tag. Actual app or website the ad appears on display campaigns.

${(last_attributed_touch_data.~sub_site_name)!}

String

对广告展示网站的引用。由广告平台传递。

${(last_attributed_touch_data.~customer_sub_site_name)!}

String

客户对广告展示网站的引用。可以由客户端在链接上指定。

${(last_attributed_touch_data.~agency)!}

String

The agency of the last touch, as set with an analytics tag. Agency that runs ad campaigns on behalf of advertiser.

${(last_attributed_touch_data.~agency_id)!}

String

The ID of agency of the last touch, as set with an analytics tag. Agency that runs ad campaigns on behalf of advertiser.

${(last_attributed_touch_data.~optimization_model)!}

String

最后触点的优化模型(带有分析标签)。详细描述 campaign 进行优化事件的模型,例如 install,click,event。

${(last_attributed_touch_data.~secondary_ad_format)!}

String

最后触点的次级广告格式,由 Analytics 标签设置或在操作后台 (Dashboard)的广告链接创建流程中设置。广告合作伙伴特定的广告格式,例如 Google 的 Display Engagement Ad。

${(last_attributed_touch_data.~external_touch)!}

String

从第三方发送到 Branch 的点击或展示(视图)ID。用于将归因事件绑定到原始触点。如果归因伙伴是 Google SAN,则这将是 gclid 值。有关更多信息,请参见本表中的 gclid。

${(last_attributed_touch_data.~journey_name)!}

String

受众群体规则/Journey 的 “Campaign 名称”或“标题”。可以由客户端在链接上指定,也可以在某些情况下自动在服务器端预先填充。

${(last_attributed_touch_data.~journey_id)!}

String

Journey 的受众群体规则 ID。服务器端自动设置。

${(last_attributed_touch_data.~view_name)!}

String

Branch 视图/模板的“视图名称”或“标题”。可以由客户端在链接上指定,也可以在某些情况下自动在服务器端预先填充。

${(last_attributed_touch_data.~view_id)!}

String

Journey 的 Branch 视图 ID。服务器端自动设置。

${(last_attributed_touch_data.+referring_domain)!}

String

用户在登陆具有 Journey 的页面之前访问的 URL domain。这应使用我们用于 "came directly from a URL" 受众筛选器的相同数据源。它由客户端指定。

${(last_attributed_touch_data.dollar_3p)!}

String

设置事件是否源自 Google AMP 或 Facebook Instant Article 上的触点。由客户端指定。

${(last_attributed_touch_data.+web_format)!}

String

The format of the webside:

  • amp
  • instant_articles

${(last_attributed_touch_data.+current_features)!}

String

Branch feature (determined by Branch) of the current touch. set automatically server side;

  • desktop_deepviews
  • desktop_journeys
  • mobile_deepviews
  • mobile_journeys
  • ads
  • email
  • social
  • quick_links

${(last_attributed_touch_data.+via_features)!}

String

All Branch features (determined by Branch) which were determined, via attribution, to have led to this event. For example, if an email link click leads to a Journey which leads to the app, the published eo_open will have +via_features:

  • EMAIL
  • JOURNEYS

or set server side:

  • desktop_deepviews
  • desktop_journeys
  • mobile_deepviews
  • mobile_journeys
  • ads
  • email
  • social
  • quick_links
<#if last_attributed_touch_data.dollar_fb_data_terms_not_signed> 1 <#else> 0 </#if>Boolean如果未从 Facebook 签署移动数据条款,这意味着我们需要对外部事件隐藏归因相关内容。服务器端自动设置;1 (true/yes) 或 0 (false/no)
${(last_attributed_touch_data.+touch_id)!}String归因触点(展示,点击等)ID。
${(last_attributed_touch_data.custom_fields)!}StringAny deep link data specified for the last touch not captured by the above fields e.g. {foo:true, deeplink_path: id/12}. "custom_fields" should not be surfaced as an independent object. The values should be included in last_attributed_touch_data. specified by the client.
${(last_attributed_touch_data.user_data_ip)!}String用户设备的 IP 地址。
${(last_attributed_touch_data.user_data_user_agent)!}StringThe User-Agent string format including product name and version and system (e.g. “Mozilla/5.0 (iPad)”).
${(last_attributed_touch_data.+device_brand_name)!}String用户设备的品牌或制造商(例如 “Apple” 或 “Samsung”);解析通过 HTTP header 发送的用户代理来确定。
${(last_attributed_touch_data.+device_brand_model)!}String用户设备的型号(例如 “Droid Pro”);解析通过 HTTP header 发送的用户代理来确定。

用户数据

以下宏表示转化时收集的用户/设备相关数据点。

Macro

类型

描述

${(user_data.os)!}

String

The operating system of the device on which the event was registered:

${(user_data.os_version)!}

String

The version of the operating system of the device on which the event was registered; specified by client.

${(user_data.os_version_android)!}

String

事件发生设备的操作系统版本(Android);由客户端指定。

${(user_data.environment)!}

String

The runtime environment where the event occurred:

  • full_web
  • full_app
  • instant_app
  • imessage_app
${(user_data.platform)!}StringA convenience dimension that allows users to easily see web vs app, desktop vs mobile, and iOS vs Android vs other
${(user_data.aaid)!}StringAndroid/Google advertising id of the device where the event occurred. specified by the client.
${(user_data.android_id)!}StringAndroid hardware id. Can only be reset by wiping the device. specified by the client.
${(user_data.idfa)!}StringiOS advertising id of the device where the event occurred. specified by the client.
${(user_data.idfv)!}StringOS vendor id of the device where the event occurred. Scoped to a vendor e.g. Facebook: idfv is the same for Facebook and Messenger but different Twitter. specified by the client.
${(user_data.kindle_aid)!}StringThe ID associated with a Kindle device.
${(user_data.windows_aid)!}StringThe Windows Advertising ID.
<#if user_data.limit_ad_tracking>1<#else>0</#if>BooleanIf the partner has opted to not be tracked by advertisers. on iOS 10+, accompanied by idfa of 0s; 1 (true/yes) OR 0 (false/no).
<#if user_data.is_jailbroken>1<#else>0</#if>BooleanIf true, then the phone that sent this event was jailbroken; 1 (true/yes) OR 0 (false/no).
${(user_data.user_agent)!}String发生事件的浏览器或应用的用户代理。通常与 webview 关联。
${(user_data.ip)!}StringThe IP address from which the API call tracking the event originated; set automatically server side.
${(user_data.developer_identity)!}StringThe developer-specified identity for a user; specified by the client.
${(user_data.language)!}StringThe ISO 639-1 Code of the language.
${(user_data.sdk_version)!}String用于追踪此事件的 Branch SDK 版本;它由客户端指定。
${(user_data.http_referrer)!}String引荐网址,其指向 Web SDK 所记录 Web 会话开始的当前页面;由客户端指定。
${(user_data.referral_source)!}StringAndroid: activity.getCallingPackage(). iOS: Web referrer, safari referrer, or bundle_id.
${(user_data.app_version)!}StringThe app version where the event occurred; specified by the client.
${(user_data.device_type)!}StringThe type of device
${(user_data.carrier_name)!}StringWhich carrier covers the device where the event occurred. specified by the client.
${(user_data.brand)!}StringBrand or make of user device (such as “Apple” or “Samsung”).
${(user_data.model)!}StringThe model of the device where the event occurred. specified by the client.
${(user_data.geo_continent_code)!}String从 IP 地址(如上)派生的大洲代码,服务器端自动设置。
${(user_data.geo_region_code)!}String从 IP 地址(上方)派生的区域代码,服务器端自动设置。
${(user_data.geo_region_en)!}StringThe human-readable region, derived from IP address (above), set automatically server side.
${(user_data.geo_dma_code)!}UInt32The DMA Code, derived from IP address (above), set automatically server side.
${(user_data.geo_city_code)!}UInt32从 IP 地址(如上)派生的城市代码,服务器端自动设置。
${(user_data.geo_city_en)!}String从 IP 地址(上方)派生的可读城市,服务器端自动设置。
${(user_data.geo_lat)!}FloatLatitude, derived from IP address (above), set automatically server side.
${(user_data.geo_lon)!}FloatLongitude, derived from IP address (above), set automatically server side.
${(user_data.geo_country_code)!}StringThe ISO 3166 code of the country.
${(user_data.geo_country_en)!}String从 IP 地址(上方)派生的国家/地区英文名称,服务器端自动设置。
${(user_data.geo_postal_code)!}String从 IP 地址(上方)派生的邮政编码,服务器端自动设置。
${(user_data.browser)!}StringWeb 事件起源浏览器的可读名称。由 User-Agent string 派生。由客户端指定。
${(user_data.cross_platform_id)!}String事件发生 Branch Persona (同人用户)的应用范围内唯一标识符。服务器端自动设置。
${(user_data.installer_package_name)!}String已安装应用的包名;服务器端自动设置。
${(user_data.cpu_type)!}String设备使用的中央处理器类型;服务器端自动设置。
${(user_data.build)!}String设备的构建版本;服务器端自动设置。
${(user_data.internet_connection_type)!}String设备使用的互联网连接类型(例如 Wifi);服务器端自动设置。
${(user_data.screen_width)!}String设备屏幕的宽度;服务器端自动设置。
${(user_data.screen_height)!}StringThe height of the screen of the device; set automatically server side.
${(user_data.carrier_name)!}String设备载体(例如 Verizon)的名称;服务器端自动设置。

事件数据

以下宏表示转化时收集的与用户/设备完成事件相关的数据点。

Macro

类型

描述

${(event_data.transaction_id)!}

String

The partner-specified transaction id for their internal use. specified by the client.

${(event_data.currency)!}

String

ISO 4217 Code for currency.

${(event_data.revenue)!}

Double

The partner-specified revenue for the event. specified by the client.

${(event_data.revenue_in_usd)!}

Double

Revenue in USD, based off of revenue, currency, and exchange rate. set automatically server side.

${(event_data.exchange_rate)!}

Double

事件发生时的汇率(可能长达24小时,但通常会在一小时内会更新)。由客户端指定。

${(event_data.shipping)!}

Double

与交易相关的运输成本。由客户端指定。

${(event_data.tax)!}

Double

与交易相关的总税额。由客户端指定。

${(event_data.coupon)!}

String

随交易兑换的交易优惠券(例如 "SPRING2017 " )。由客户端指定。

${(event_data.affiliation)!}

String

发生交易的商店或联盟关系(例如 Google Store)。由客户端指定。

${(event_data.search_query)!}

String

Search query associated with the event. specified by the client.

${(event_data.ad_type)!}

String

Ad type that the user saw or clicked on. Defined by Facebook. specified by the client:

  • banner
  • interstitial
  • rewarded_video
  • native
${(event_data.description)!}String事件相关描述,不一定特定于个别内容项目。由客户端指定。

内容项目数据

以下宏表示与转化时收集到的用户/设备完成的事件中的内容相关的数据点

Macro类型描述
${(content_items[0].$content_schema)!}StringThe category / schema for a piece of content. specified by the client:commerce_auction / commerce_business / commerce_other / commerce_product / commerce_restaurant / commerce_service / commerce_travel_flight / commerce_travel_hotel / commerce_travel_other / game_state / media_image / media_mixed / media_music / media_other / media_video / other / text_article / text_blog / text_other / text_recipe / text_review / text_search_results / text_story / text_technical_doc |
<#if content_items[0].$publicly_indexable> 1 <#else> 0 </#if>Booleantrue:内容可被索引以供本地(设备)使用;或者 false:无法为本地使用编制索引;由客户端指定;1 (true/yes) 或 0 (false/no)
<#if content_items[0].$locally_indexable> 1 <#else> 0 </#if>Booleantrue:任何人都可以看到内容;或者 false:无法为公共使用编制索引;由客户端指定;1 (true/yes) 或 0 (false/no)
${(content_items[0].$exp_date!}Fixed64最后一次,之后此内容不再有效。 null / 0表示没有限制。它由客户端指定。
${(content_items[0].$canonical_identifier)!}String用于使 Branch 统一内容/消息。由客户端指定。
${(content_items[0].$og_title)!}String所呈现文档标题(也用于搜索)—如果是集合,则是该集合的标题而不是单个项目。由客户端指定。
${(content_items[0].$canonical_url)!}String引用公共 Web 内容(移动设备或台式机)的 web URL。最好是一个永久链接,且在其他地方(主网站,AMP 页面等)用作规范 URL。由客户端指定。
${(content_items[0].$og_description)!}String说明(针对单个项目)。由客户端指定。
${(content_items[0].$og_image_url)!}String图片 URL。由客户端指定。
${(content_items[0].$keywords)!}String任何关键字。由客户端指定。
${(content_items[0].$price)!}Double产品/内容的单价。由客户端指定。
${(content_items[0].$price_in_usd)!}Double基于价格、货币和汇率的美元单价。由客户端指定或服务器端自动设置。
${(content_items[0].$quantity)!}DoubleThe quantity of the item to be ordered (for PURCHASE, ADD_TO_CART, etc). specified by the client.
${(content_items[0].$value)!}DoubleThe value is the product of $price multiplied by $quantity. specified by the client OR set automatically server side.
${(content_items[0].$value_in_usd)!}DoubleThe value in USD (see $value above), based off of price, currency, and exchange rate. specified by the client OR set automatically server side.
${(content_items[0].$sku)!}String产品 sku 或产品 ID。由客户端指定。
${(content_items[0].$product_name)!}StringThe product's name. specified by the client.
${(content_items[0].$product_brand)!}String产品的品牌。由客户端指定。
${(content_items[0].$product_variant)!}String产品变体(例如 XL)。由客户端指定;animals_and_pets_supplies / apparel_and_accessories / arts_and_entertainment / baby_and_toddler / business_and_industrial / cameras_and_optics / electronics / food_beverage_and_tobacco / furniture / hardware / health_and_beauty / home_and_garden / luggage_and_bags / mature / media / office_supplies / religious_and_ceremonial / software / sporting_goods / toys_and_games / vehicles_and_parts
${(content_items[0].$rating)!}DoubleThe rating given by the user on a RATE event. specified by the client.
${(content_items[0].$rating_average)!}Double项目的平均评分。由客户端指定。
${(content_items[0].$rating_count)!}Int64项目的评分数。由客户端指定。
${(content_items[0].$rating_max)!}Double项目的最高可能评分(例如5星是最高可能评分)。由客户端指定。
${(content_items[0].$address_street)!}String客户指定的餐厅、公司、房间(酒店)等的街道地址。
${(content_items[0].$address_city)!}String客户指定的餐厅、公司、房间(酒店)等所在的城市。
${(content_items[0].$address_country)!}String客户指定的餐厅、公司、房间(酒店)等所在国家/地区代码。
${(content_items[0].$address_postal_code)!}String客户指定的餐厅、公司、房间(酒店)等所在地的邮政编码。
${(content_items[0].$latitude)!}Float客户指定的餐厅、公司、房间(酒店)等所在地的纬度。
${(content_items[0].$longitude)!}FloatThe longitude for a restaurant, business, room (hotel), etc. specified by the client.
${(content_items[0].$condition)!}String对于拍卖,该物品是否是新的,良好的,可以接受的,等等。由客户端指定;new / excellent / good / fair / poor / used / refurbished / other
${(content_items[0].$image_captions)!}String与图像相关的标题。由客户端指定。
${(content_items[0].$creation_timestamp)!}Fixed64内容创建的时间。由客户端指定。
${(content_items[0].$currency)!}StringThe ISO 4217 code of currency.
${(content_items[0].custom_fields)!}String合作伙伴指定的 BUO 相关自定义 key-values pairs。由客户端指定。

Cohort(同期群)相关数据

以下宏表示基于 install 或 re-engagement activity 的同期群用户相关数据点。

Macro类型描述
${(install_activity.event_name)!}
或者
${(reengagement_activity.event_name)!}
StringCohort(同期群)事件的名称。
<#if install_activity.attributed> 1 <#else> 0 </#if>或者<#if reengagement_activity.attributed> 1 <#else> 0 </#if>Booleaninstall/re-engagment 事件是否被归因;1 (true/yes) 或 0 (false/no)
${(install_activity.timestamp)!}
或者
${(reengagement_activity.timestamp)!}
Fixed64UTC 中安装/重新参与(reengagement)时间的时间戳(以毫秒为单位)
${(install_activity.touch_data.tilde_advertising_partner_name)!}
或者
${(reengagement_activity.touch_data.tilde_advertising_partner_name)!}
String为最后归因触点指定的可读广告合作伙伴名称。服务器端自动设置。
${(install_activity.touch_data.dollar_3p)!}
或者
${(reengagement_activity.touch_data.dollar_3p)!}
String设置事件是否源自 Google AMP 或 Facebook Instant Article 上的触点。由客户端指定。
${(install_activity.touch_data.tilde_tune_publisher_id)!}
或者
${(reengagement_activity.touch_data.tilde_tune_publisher_id)!}
Fixed64The publisher ID of the last touch.

CTA 视图数据

以下宏表示与 Journeys 或 Deepview 数据相关的数据点,其中没有链接点击。

Macro

类型

描述

${(last_cta_view_data.~id)!}

Fixed64

上一个 CTA 视图 ID。服务器端自动设置。

${(last_cta_view_data.~campaign)!}

String

为上一个 CTA 视图指定的 campaign(名称)。可以由客户端在链接上指定,也可以在某些情况下自动在服务器端预填充。

${(last_cta_view_data.~campaign_id)!}

String

为上一个 CTA 视图指定的 campaign ID。服务器端自动设置。

${(last_cta_view_data.~campaign_type)!}

String

Google campaign 类型; Google AAP 字段。服务器端自动设置。

${(last_cta_view_data.~customer_campaign)!}

String

为上一个 CTA 视图指定的客户 campaign。可以由客户端在链接上指定。

${(last_cta_view_data.~channel)!}

String

为上一个 CTA 视图指定的渠道。可以由客户端在链接上指定,也可以在某些情况下自动在服务器端预填充。

${(last_cta_view_data.~feature)!}

String

为上一个 CTA 视图指定的功能。可以由客户端在链接上指定,也可以在某些情况下自动在服务器端预填充。

${(last_cta_view_data.~stage)!}

String

为上一个 CTA 视图指定的阶段。可以由客户端在链接上指定,也可以在某些情况下自动在服务器端预填充。

${(last_cta_view_data.~tags)!}

String

为上一个 CTA 视图指定的标签。可以由客户端在链接上指定,也可以在某些情况下自动在服务器端预填充。

${(last_cta_view_data.~advertising_partner_name)!}

String

为上一个 CTA 视图指定的可读广告合作伙伴名称。服务器端自动设置。

${(last_cta_view_data.~advertising_partner_id)!}

String

The ID for the advertising partner specified for the last CTA view. set automatically server side OR specified by the client.

${(last_cta_view_data.~secondary_publisher)!}

String

为上一个 CTA 视图指定的子发行商。由广告平台传递。

${(last_cta_view_data.~secondary_publisher_id)!}

String

为上一个 CTA 视图指定的子发行商 ID。由广告平台传递。

${(last_cta_view_data.~customer_secondary_publisher)!}

String

为上一个 CTA 视图指定的子发行商 ID。由广告平台传递。

${(last_cta_view_data.~creative_name)!}

String

为上一个 CTA 视图指定的广告素材名称。服务器端自动设置。

${(last_cta_view_data.~creative_id)!}

String

为上一个 CTA 视图指定的广告素材 ID。服务器端自动设置。

${(last_cta_view_data.~ad_set_name)!}

String

为上一个 CTA 视图指定的广告集合名称。服务器端自动设置。

${(last_cta_view_data.~ad_set_id)!}

String

为上一个 CTA 视图指定的广告集合 ID。服务器端自动设置。

${(last_cta_view_data.~customer_ad_set_name)!}

String

为上一个 CTA 视图指定的客户广告集合名称。可以由客户端在链接上指定。

${(last_cta_view_data.~ad_name)!}

String

为上一个 CTA 视图指定的广告名称。服务器端自动设置。

${(last_cta_view_data.~ad_id)!}

String

为上一个 CTA 视图指定的广告 ID。服务器端自动设置。

${(last_cta_view_data.~customer_ad_name)!}

String

为上一个 CTA视图指定的客户广告名称。可以由客户端在链接上指定。

${(last_cta_view_data.~keyword)!}

String

为上一个 CTA 视图指定的关键字。服务器端自动设置。

${(last_cta_view_data.~keyword_id)!}

String

由 Google 提供的最后视图的关键字唯一 ID。

${(last_cta_view_data.~customer_keyword)!}

String

最后视图的客户关键字。可以由客户端在链接上指定。

${(last_cta_view_data.~branch_ad_format)!}

String

最后视图的广告格式。在创建 Branch Link 时选择的广告格式,并将其设置为分析标签。例如,Search,Display,Product,App only。

${(last_cta_view_data.~technology_partner)!}

String

最后视图的技术合作伙伴(带有分析标签)。除代理商外,用于增强 campaign 的任何第三方(例如,提供受众,广告素材优化)

${(last_cta_view_data.~banner_dimensions!}

String

最后视图的显示横幅尺寸,带有分析标签。

${(last_cta_view_data.~placement)!}

String

最后视图的放置,带有分析标签。广告在展示 campaign 中显示的实际应用或网站

${(last_cta_view_data.~placement_id)!}

String

最后视图的放置 ID,带有分析标签。广告在展示 campaign 中显示的实际应用或网站

${(last_cta_view_data.~customer_placement)!}

String

客户指定最后视图的放置位置,带有分析标签。广告在展示 campaign 中显示的实际应用或网站

${(last_cta_view_data.~sub_site_name)!}

String

对广告展示网站的引用。由广告平台传递。

${(last_cta_view_data.~customer_sub_site_name)!}

String

客户对广告展示网站的引用。可以由客户端在链接上指定。

${(last_cta_view_data.~agency)!}

String

最后视图的代理商,带有分析标签。代表广告主投放广告 campaign 的代理商。

${(last_cta_view_data.~agency_id)!}

String

最后视图的代理商 ID,带有分析标签。代表广告主投放广告 campaign 的代理商。

${(last_cta_view_data.~optimization_model)!}

String

最后视图的优化模型,带有分析标签。该模型详细描述 campaign 为其优化事件的模型,例如 install,click,event

${(last_cta_view_data.~secondary_ad_format)!}

String

最后视图的次级广告格式,带有分析标签或在操作后台 (Dashboard)的广告链接创建流程中设置。广告合作伙伴特定的广告格式,例如 Google 的 Display Engagement Ad。

${(last_cta_view_data.~external_touch_id)!}

String

The ID of click or impression (view) sent to Branch from a third party. Used to tie an attributed event back to the original touch. Where the attributed partner is Google SAN, this will be the gclid value. See gclid in this sheet for more information.

${(last_cta_view_data.~journey_name)!}

String

受众群体规则/Journey 的 “Campaign 名称”或“标题”。可以由客户端在链接上指定,也可以在某些情况下自动在服务器端预填充。

${(last_cta_view_data.~journey_id)!}

String

Journey 的受众群体规则 ID。服务器端自动设置。

${(last_cta_view_data.~view_name)!}

String

Branch 视图/模板的“视图名称”或“标题”。可以由客户端在链接上指定,也可以在某些情况下自动在服务器端预填充。

${(last_cta_view_data.~view_id)!}

String

Journey 的 Branch 视图 ID。服务器端自动设置。

${(last_cta_view_data.plus_referring_domain)!}

String

用户在登陆具有 Journey 的页面之前访问的 URL domain。这应使用我们用于 "came directly from a URL" 受众筛选器的相同数据源。它由客户端指定。

${(last_cta_view_data.3p)!}

String

设置事件是否源自 Google AMP 或 Facebook Instant Article 上的触点。由客户端指定。

${(last_cta_view_data.+web_format)!}

String

The format of the website;

  • amp
  • instant_articles
${(last_cta_view_data.+via_features)!}String当前触点的 Branch 功能(由 Branch 确定)。服务器端自动设置; desktop_deepviews / desktop_journeys / mobile_deepviews / mobile_journeys / ads / email / social / quick_links
${(last_cta_view_data.+touch_id)!}String归因触点的(展示,点击等)ID
${(last_cta_view_data.custom_fields)!}StringAny deep link data specified for the last view not captured by the above fields e.g. {foo:true, deeplink_path: 'id/12'}. "custom_fields" should not be surfaced as an independent object. The values should be included in last_attributed_touch_data. specified by the client.

自定义数据

以下宏表示与 Branch 预先分配的自定义数据点相关的数据点。

Macro类型描述
${(custom_data.sub1)!}String通用字段,用于将数据从 click 传递到 install,open 和 conversion 事件。
${(custom_data.sub2)!}String通用字段,用于将数据从 click 传递到 install,open 和 conversion 事件。
${(custom_data.sub3)!}String通用字段,用于将数据从 click 传递到 install,open 和 conversion 事件。
${(custom_data.sub4)!}String通用字段,用于将数据从 click 传递到 install,open 和 conversion 事件。
${(custom_data.sub5)!}String通用字段,用于将数据从 click 传递到 install,open 和 conversion 事件。
${(custom_data.content_id)!}String应用内事件期间与之交互的内容 ID。
${(custom_data.content_type)!}String应用内事件期间与之交互的内容类型。
${(custom_data.date1)!}String应用内事件 “reservation” 的检入时间。
${(custom_data.date2)!}String应用内事件 “reservation” 的检出时间。
${(custom_data.level)!}String已达到事件级别。
${(custom_data.quantity)!}String与应用内事件相关的计数;例如,人数或积分消费。
${(custom_data.rating)!}String与应用内事件相关的评分;例如4星级。
${(custom_data.transaction_id)!}String转化记录的交易 ID。

URL Function Macros & Freemarker

Along with our URL macros, we also support a variety of URL functions to be used in conjunction with our macros. Using functions gives you more control over how your data is formatted for your own internal uses.

我们根据采取的操作类型和处理的信息类型对功能进行分组。

More information on Freemarker can be found here.

Hashing/Encoding/etc.

Function macros that can hash, encode/decode or otherwise modify another macro’s value; e.g. the MD5 hash of a unique identifier.

Hashing/Encoding/etc.类型描述
<@alphanumeric>INPUT_MACRO_HERE</@alphanumeric>Function从 string 中删除非字母数字字符。
<@base64>INPUT_MACRO_HERE</@base64>Base64Base64 对内容进行编码
<@json>INPUT_MACRO_HERE</@jsonJSONJSON 将内容编码为 string。
<@jsonmap>INPUT_MACRO_HERE</@jsonmap>JSONJSON 以任何方式对数据进行编码(请确保不要引用)。
<@lower>INPUT_MACRO_HERE</@lower>Function返回格式为小写且带有冒号的输入值。
<@md5>INPUT_MACRO_HERE</@md5>MD5MD5 对内容进行编码
<@sha1>INPUT_MACRO_HERE</@sha1>SHA1SHA1 对内容进行编码
<@sha256>INPUT_MACRO_HERE</@sha256>SHA256SHA256 对内容进行编码
<@upper>INPUT_MACRO_HERE</@upper>Function返回格式为大写且带有冒号的输入值。
<@urldecode>INPUT_MACRO_HERE</@urldecode>DecodeURL解码内容。
<@urldecode>INPUT_MACRO_HERE</@urldecode>EncodeURL 对内容进行编码。

Datetime

返回有关另一个宏值的时间信息的函数宏;例如应用内 purchase 事件时间。

格式描述
<@dateformat output_date_format="yyyy-MM-dd">INPUT_MACRO_HERE</@dateformat>返回指定转化的日历时间
<@dateformat output_date_format="yyyy-MM-dd HH:mm:ss">INPUT_MACRO_HERE</@dateformat>Returns the DateTime of the specified conversion
<@dateformat output_date_format="TIMESTAMP_SECONDS">INPUT_MACRO_HERE</@dateformat>返回指定转化的当前 Unix 时间戳(以秒为单位)
<@dateformat output_date_format="TIMESTAMP_MILLIS">INPUT_MACRO_HERE</@dateformat>返回指定转化的当前 Unix 时间戳(以毫秒为单位)
<@iso8601UTCDate>INPUT_MACRO_HERE</@iso8601UTCDate>Format a DateTime value in ISO 8601 UTC. Returns an empty string for missing data or data that is not a DateTime. As DateTime doesn’t store millisecond precision, milliseconds are hard-coded to 000

一般操作

执行各种常规操作的函数宏;例如,将布尔值修改为整数。

Action描述
<@countryCodeIso3166>INPUT_MACRO_HERE</@countryCodeIso3166>Returns the ISO 3166-1 two-letter country code.
<@firstNotEmpty>INPUT_MACRO_HERE</@firstNotEmpty>Gets the first value that isn’t empty in a `` delimited string.
<@languageIso639>INPUT_MACRO_HERE</@languageIso639>Returns the ISO 639-1 two-character language code.
<@loop data=app.app_bundles val="bundle"><#if user_data.os == bundle.os><#if bundle.os=="ANDROID"><@break/><#elseif bundle.os == "IOS">${(bundle.ios.itunes_id?substring(2))!}</#if><@break/></#if></@loop>Return the store_app_id for an iOS site and a package_name for an Android site.
<@loop>INPUT_MACRO_HERE</@loop><@break><@sep>在数据中指定的变量周围循环,将每个连续循环分配给 val 中指定的名称。确保不要在数据两边加上引号。
<@rand>INPUT_MACRO_HERE</@rand>返回介于0和2 ^ 31之间的随机值。
<@ternary>INPUT_MACRO_HERE</@ternary>A basic implementation of ternary functionality that uses | to separate parameters This function must receive 4 parameters or nothing will be returned. Given parameter 0 matches parameter 1, parameter 2 will be returned. Given parameter 0 does not match parameter 1, parameter 3 will be returned.
<@truncate>INPUT_MACRO_HERE</@truncate>返回一个缩短为40个字符的值。
<#assign captured>%s</#assign><#if captured>1<#else>0</#if>Casts a boolean string to its integer counter part.
<#if (last_attributed_touch_data["~tune_publisher_id"])! == %s>1<#else>0</#if>Return whether or not the install or event is attributed to the same partner as the postback partner; returns 1 = true or 0 = false.
<#if user_data.os == "IOS">0<#elseif user_data.os == "ANDROID">1<#elseif user_data.os == "WINDOWS">2<#else>null</#if>Return the platform as an integer ios = 0, android = 1, windows = 2.

Unsupported Freemarker Expressions

由于安全限制,Branch 不支持以下 Freemarker 表达式:

  • <#import>
  • <#visit>
  • <#include>
  • ?eval
  • <#recurse>
  • <#setting>
  • <#macro>
  • <#function>
  • <#nested>
  • <#return>
  • <#list>