2015-04-19 256 views
0

我沒有單獨的感謝/確認頁面來跟蹤特定着陸頁上的目標轉化次數。因此,我需要事件跟蹤着陸頁上的「提交表單」按鈕,以統計表單提交次數作爲來自該頁面的目標轉化次數。如何使用Google Analytics事件跟蹤特定事件?

如何事件跟蹤「提交表單」按鈕,以便在有人提交表單時顯示在「目標完成」頁面上。

+4

哪種語言?什麼平臺?請清楚你需要什麼。 – Iqbal

+0

Web服務器:Apache,框架:PHP, –

回答

0

這裏基於事件(很容易做到)的目標,你會發現如何創建一個目標是基於特定的事件,而不是一個頁面視圖:

https://support.google.com/analytics/answer/1032415?hl=en#goal_types

要派出由目標預期的情況下,我會建議你使用這個jQuery插件(我是作者),這是爲建立容易爲Google Analytics設置事件跟蹤:

https://github.com/DiegoZoracKy/google-analytics-event-tracking

代碼的結果將是這樣的:

$.googleAnalyticsEventTracking({ 
    targetSelector: '#id-of-the-form', // it can be any jQuery selector 
    events: { 
     eventType: 'submit', 
     gaEventData: { 
      category: 'Form', // The same as you will set on the Goal setup 
      action: 'Sent', // The same as you will set on the Goal setup 
      label: 'Sign Up' // The same as you will set on the Goal setup 
     } 
    } 
}); 
0

保存在一個文件中的谷歌分析腳本說analyticsTracking.php的,則包括如下文件:

<?php include_once("analyticstracking.php"); ?> 

被保存在analyticsTracking.php的代碼可以從谷歌分析網站上找到。

這裏是谷歌開發者鏈接樣品Google Analytics Guide

0

使用此在您的鏈接:

的onClick =「GA( '發送', '事件', '按鈕', '點擊',「購買細節');」

您可以編輯事件後的3個選項,然後你必須進入谷歌Analytics(分析),併成立

相關問題