API การติดตามของ Google Analytics ประกอบด้วยออบเจ็กต์ส่วนกลาง 2 รายการ ได้แก่ _gat
สำหรับการติดตามมาตรฐาน และ _gaq
สำหรับการติดตามแบบไม่พร้อมกัน ออบเจ็กต์ส่วนกลางทั้ง 2 รายการนี้มีวิธีสร้างออบเจ็กต์ตัวติดตาม ออบเจ็กต์ตัวติดตามใช้เพื่อติดตามหน้าเว็บของคุณ และมีหลายวิธีในการกำหนดค่าวิธีการทำงานของการติดตามดังกล่าว
หน้านี้เป็นข้อมูลอ้างอิงที่สมบูรณ์ของเมธอดทั้งหมดที่มีอยู่ใน _gat
, _gaq
และออบเจ็กต์ติดตาม
_gat เมธอดออบเจ็กต์
_getTracker(account)
เลิกใช้งานแล้ว_createTracker(opt_account, opt_name)
_getTrackerByName(opt_name)
_anonymizeIp()
_gaq เมธอดของออบเจ็กต์
_createAsyncTracker(accountId, opt_name)
เลิกใช้งานแล้ว_getAsyncTracker(opt_name)
เลิกใช้งานแล้วpush(commandArray)
เมธอดของออบเจ็กต์เครื่องมือติดตาม
_addIgnoredOrganic(newIgnoredOrganicKeyword)
_addIgnoredRef(newIgnoredReferrer)
_addItem(transactionId, sku, name, category, price, quantity)
_addOrganic(newOrganicEngine, newOrganicKeyword, opt_prepend)
_addTrans(transactionId, affiliation, total, tax, shipping, city, state, country)
_clearIgnoredOrganic()
_clearIgnoredRef()
_clearOrganic()
_cookiePathCopy(newPath)
_deleteCustomVar(index)
_getName()
_setAccount()
_getAccount()
_getClientInfo(1)
_getDetectFlash(1)
_getDetectTitle(1)
_getLinkerUrl(targetUrl, useHash)
_getLocalGifPath()
_getServiceMode()
_getVersion()
_getVisitorCustomVar(index)
_initData()
เลิกใช้งานแล้ว_link(targetUrl, useHash)
_linkByPost(formObject, useHash)
_setAllowAnchor(bool)
_setAllowHash(bool)
เลิกใช้งานแล้ว_setAllowLinker(bool)
_setCampContentKey(newCampContentKey)
_setCampMediumKey(newCampMedKey)
_setCampNameKey(newCampNameKey)
_setCampNOKey(newCampNOKey)
_setCampSourceKey(newCampSrcKey)
_setCampTermKey(newCampTermKey)
_setCampaignCookieTimeout(cookieTimeoutMillis)
_setCampaignTrack(bool)
_setClientInfo(bool)
_setCookiePath(newCookiePath)
_setCookiePersistence(milliseconds)
เลิกใช้งานแล้ว_setCookieTimeout(newDefaultTimeout)
เลิกใช้งานแล้ว_setCustomVar(index, name, value, opt_scope)
_setDetectFlash(bool)
_setDetectTitle(bool)
_setDomainName(newDomainName)
_setLocalGifPath(newLocalGifPath)
_setLocalRemoteServerMode()
_setLocalServerMode()
_setReferrerOverride(newReferrerUrl)
_setRemoteServerMode()
_setSampleRate(newRate)
_setSessionTimeout(newTimeout)
เลิกใช้งานแล้ว_setSiteSpeedSampleRate(sampleRate)
_setSessionCookieTimeout(cookieTimeoutMillis)
_setVar(newVal)
เลิกใช้งานแล้ว_setVisitorCookieTimeout(cookieTimeoutMillis)
_storeGac(bool)
_trackEvent(category, action, opt_label, opt_value, opt_noninteraction)
_trackPageLoadTime()
เลิกใช้งานแล้ว_trackPageview(opt_pageURL)
_trackSocial(network, socialAction, opt_target, opt_pagePath)
_trackTiming(category, variable, time, opt_label, opt_sampleRate)
_trackTrans()