Membuat URL klik langsung
Metode ini membutuhkan v2.4.0 ke atas
Metode ini merupakan perpanjangan dari Smart Script
Pastikan Anda membaca implementasi dan argumenSmart Script
Overview
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.
Argumen
Argumen | Catatan | Contoh | |
---|---|---|---|
afParameters (wajib)
|
mediaSource (wajib) |
Objek konfigurasi untuk sumber media |
|
campaign |
Objek konfigurasi untuk kampanye |
|
|
channel |
Objek konfigurasi untuk saluran |
|
|
ad |
Objek konfigurasi untuk iklan |
|
|
adSet |
Objek konfigurasi untuk adset |
|
|
Parameter kueri (khusus) lainnya |
|
|
|
platform |
Sebuah string menjelaskan platform. HARUS dari daftar ini:
|
"steam" | |
app_id | ID aplikasi | "123456" | |
redirectURL | URL tempat pengguna akan dialihkan | "https://store.steampowered.com/app/123456/Team_Fortress_2/" |
Game landing page demo
You can find here a fully functional demo landing page which demonstrates integrating the generateDirectClickURL
Smart Script code.
Contoh kode untuk game Steam
//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;
}
Lihat contoh konversi URL masuk ke URL klik langsung keluar untuk game Steam.
Diperbarui 4 bulan yang lalu