Creating a direct click URL

šŸš§

This method requires v2.4.0 and above

šŸ“˜

This method is an extension to Smart Script

Make sure you read the Smart Script implementation and arguments

VisĆ£o Geral

This method provides support for creating a click URLs, to be used mainly by non mobile platforms (e.g. Steam, CTVs etc). When the click is matched to an installation, an attribution will be noted.

Argumentos

Argumento ObservaƧƵes Exemplo

afParameters

(obrigatĆ³rio)

Ā 

Ā 

Ā 


mediaSource

(obrigatĆ³rio)

Objeto de configuraĆ§Ć£o para fonte de mĆ­dia

  • Chaves: ['incoming_mediasource' 'utm_source']
  • Substituir valores: {twitter: 'twitter_int', orig_src: 'new_src'}
  • Valor padrĆ£o: ['any_source']

campaign

Objeto de configuraĆ§Ć£o para campanha

  • Chaves: ['incoming_campaign', 'utm_campaign']
  • Substituir valores: {campaign_name: 'new_campaign_name'}
  • Valor padrĆ£o: ['any_campaign_name']

channel

Objeto de configuraĆ§Ć£o para canal

  • Chaves: ['incoming_channel', 'utm_channel']
  • Substituir valores: {video: 'new_video'}
  • Valor padrĆ£o: ['any_video']

ad

Objeto de configuraĆ§Ć£o para anĆŗncio

  • Chaves: ['incoming_ad', 'utm_ad']
  • Substituir valores: {ad_name: 'new_ad_name'}
  • Valor padrĆ£o: ['any_ad_name']
adSet

Objeto de configuraĆ§Ć£o para adset

  • Chaves: ['incoming_adset', 'utm_adset']
  • Substituir valores: {'adset_name': 'new_adset_name'}
  • Valor padrĆ£o: ['any_adset_name']
Outros parĆ¢metros de consulta (personalizados)
  • Lista de quaisquer outros parĆ¢metros que vocĆŖ deseja incluir na URL de saĆ­da do OneLink para atribuiĆ§Ć£o ou deep linking, junto com seus objetos de configuraĆ§Ć£o.
  • O nome do parĆ¢metro personalizado Ć© listado pelo desenvolvedor como paramKey no objeto de configuraĆ§Ć£o.
  • paramKey: 'deep_link_sub1'
  • Chaves: ['page_id']
  • Substituir valores: {page12: 'new_page12'}
  • Valor padrĆ£o: 'page1'
platform A string describes the platform. MUST be from this list:
  • smartcast
  • tizen
  • roku
  • webos
  • vidaa
  • playstation
  • android
  • ios
  • steam
  • quest
  • battlenet
  • "steam"
    app_id ID do aplicativo "123456"
    redirectURL The URL the user will be redirected "https://store.steampowered.com/app/123456/Team_Fortress_2/"

    Code example for a Steam game

    //Initializing Smart Script arguments
    // If a media source key is NOT FOUND on the link and NO default value is found, the script will return a null string 
    var mediaSource = {keys: ["my_media_source"], defaultValue: "my_default_media_source"};
    var campaign = {keys: ["my_campaign"], defaultValue: "my_default_campaign"};
    
    //Calling the function after embedding the code will be through a global parameter on the window object called window.AF_SMART_SCRIPT
    //Onelink URL is generated
    
    var result = window.AF_SMART_SCRIPT.generateDirectClickURL({
      afParameters:{
        mediaSource: mediaSource,
        campaign: campaign
      },
      platform: 'steam',
      app_id: '123456',
      redirectURL:'https://store.steampowered.com/app/123456/Team_Fortress_2/'
    })
    
    var result_url = "No output from script"
    if (result) {
      result_url = result.clickURL;            
    }
    

    See example of the conversion of an incoming URL to an outgoing direct click URL for a Steam game.