CPA JS Tag < 追蹤設定原理及埋 tag 範例 > 2018 Q4 LINE Corporation 2018-11-21 1
CPA JS Tag 追蹤設定原理 LINE Corporation 2
CPA: Java script 追蹤設定原理 任務詳細資訊 登錄 (LP) 感謝 (CV 完成 ) 前往任務 1 st party cookie {Session ID} 轉化 Conversion Points API Server lp.js cv.js 當導引 前往登錄 (LP) 時, LINEID 會新增點數 Session ID 為 GET parameter. LP tag 會建 cookie 並送出 Session ID. CV tag 將從 cookie 中抓取 Session ID 並發送給 Points Server. 當 CV 順利完成後, cookie 將會 被刪除. 1. 需使 LINE 提供的 JS 語法, 請複製並貼上各個 tag 到指定 2. 網址必須為 機版網址 中途不可更換瀏覽器或裝置, 且留意登錄 和感謝 的相同網域 (top level domain) 需相同才能讀寫 cookie Cookie 會於 24 時後失效, 故 戶必須於 24 時 內完成轉化, 機的 web 瀏覽器要開啟不阻擋 Cookie 的功能 CV tag/ LP tag 會再送審進 測試階段時提供, 且僅提供正式環境測試
即時發點 CPA JS Tag < 埋 tag 範例 > LINE Corporation 4
如何設定 動審核 (auto-approval) 活動的 tag ( 固定 額商品 ) 請依據 LINE 發出的 tags, 複製貼上各 tag 指定. 登錄 tag (LP tag)( 範例 ) <!-- LINE Free Coins LP Tracking Code Start --> <script type="text/javascript > var freecoins_lpq = [ { "app": XXX" } ]; <script src="https://freecoins.line-apps.com/lfc5.js" async> <!-- LINE Free Coins LP Tracking Code End --> 轉換 tag (CV tag) ( 範例 ) 複製並貼上各 tag. * XXX 會是系統 動產 的代碼, 格式類似於 FREECOINS_2533 <!-- LINE Free Coins CV Tracking Code Start --> <script type="text/javascript"> var freecoins_cvq = [ { "app": XXX" } ]; <script src="https://freecoins.line-apps.com/lfc5.js" async> <!-- LINE Free Coins CV Tracking Code End --> * 請勿更動程式碼的順序, 並按照上 範例, 將 LINE 發出的 tags 完整複製貼上. 若未完整複製貼上, 有可能發 追蹤失敗的情形. 若您在設定 tag 過程有任何疑問, 請洽詢業務窗.
如何設定 LP 與 CV page 為同 的活動 當您的 LP 與 CV 完成 為同 時 ( 例如會員登錄等, 登錄完 動轉成感謝 ), 請參照下 說明設定, 勿更動程式碼順序 <html> <head><title>sample LP</title></head> <script src="https://code.jquery.com/jquery-2.1.3.min.js"> <!-- LINE Free Coins LP Tracking Code Start --> <script type="text/javascript > var freecoins_lpq = [ { "app": XXX" } ]; <script src="https://freecoins.line-apps.com/lfc5.js" async> <!-- LINE Free Coins LP Tracking Code End --> 複製並貼上 LP tag. <script type="text/javascript"> $(document).ready( function() { $("#button_submit").click( function(){ $.ajax({ }); }); url: "http://yourapi.com", type: "POST", data: "{email}, success: function(d) { } }); <body> freecoins_cv("xxx"); <input type="text" name="email" /> <input type="button" value="submit" id="button_submit" /> </body> </html> 廣告主需寫 觸動 CV 的動作指令 完成 CV 將呼叫 Free Coins Server 並送出 CV 指令. freecoins_cv( XXX );
事後發點 CPA JS Tag < 埋 tag 範例 > LINE Corporation 7
如何設定事後發點 CPA 活動 LP tag (example) (LP 及 CV Pages 需為不同 ) <!-- LINE Free Coins LP Tracking Code Start --> <script type="text/javascript > var freecoins_lpq = [ { "app": FREECOINS_XXX", "expires": 2592000, ".yourdomain.com" } ]; <script src="https://freecoins.line-apps.com/lfc5.js" async> <!-- LINE Free Coins LP Tracking Code End --> CV tag (example) <!-- LINE Free Coins CV Tracking Code Start --> <script type="text/javascript"> var freecoins_cvq = [ { "app": FREECOINS_XXX", ] } "cv": [ } { action: "REGISTRATION", order: "Input order identifier", item: "Input item identifier", t_price: "Input total price" u_price: "Input unit price", quantity: "Input quantity", memo: "Input memo ]; <script src="https://freecoins.line-apps.com/lfc5.js" async> <!-- LINE Free Coins CV Tracking Code End --> 請將 tag 分別埋 landing page 及 conversion page 廣告主成功發出的識別碼或訂單編號 (order) 需要在下述 CV tag 2 order 中帶 1 action: set the fixed values (required) 2 order: identifier unique to the success order (required, max 128 bytes) 3 item: identifier for purchased product (optional, max 255 bytes) 4 t_price: total price paid at purchase (optional, example: 1.00; 若為電 商務產業, 此為必要欄位 ) 5 u_price: unit price for purchased product (optional, example: 1.00) 6 quantity: quantity of products purchased (optional, number) 7 memo: Optional information (optional, max 255 bytes) * 若沒有要帶 上述 optional 項, 請刪除不必要的部分