Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

What is the tracking flow for Yahoo! Web Analytics?

Last Updated: March 28, 2012
Text Size: A A A

Save to My Help

Save this article to My Help for easy reference. You can visit the article at any time from any computer.

Replace an article

You have reached the maximum number of saved articles. Your oldest saved article will be replaced with the new one.

Yahoo! Web Analytics is installed by adding a JavaScript tracking code to each web page you wish to track. Yahoo! Web Analytics generates a unique JavaScript tracking code for each project (web site), which includes a project ID, which uniquely identifies your web property for the purpose of data collection. In the code sample below, the project ID is: 123456789.

<!-- Yahoo! Web Analytics - All rights reserved -->
<script type="text/javascript" src="http://d.yimg.com/mi/ywa.js"></script>
<script type="text/javascript">
/*globals YWA*/
var YWATracker = YWA.getTracker("1000123456789");
/*
YWATracker.setDocumentName("");
YWATracker.setDocumentGroup("");
*/
YWATracker.submit();
</script>
<noscript>
<div><img src="http://a.analytics.yahoo.com/p.pl?a=1000123456789&js=no" width="1" height="1" alt="" /></div>
</noscript>

Upon loading a page, the browser processes the JavaScript tracking code. That code directs the browser to retrieve a small, invisible pixel from the Yahoo! Web Analytics web server and to process the JavaScript include file. In so doing, detailed information about visitors’ activity is sent to the Yahoo! Web Analytics database, and Yahoo! Web Analytics sets (or resets) a first-party cookie in the visitors’ browsers.

The first time a visitor comes to your web site, Yahoo! Web Analytics sets a one-year, first-party, persistent cookie in their browser that includes a unique visitor ID number. During the first visit, Yahoo! Web Analytics identifies them as a first time visitor. On subsequent visits, Yahoo! Web Analytics resets the cookie life to one year beyond the date of the visit, and identifies them as a returning visitor for the duration of that visit. If Yahoo! Web Analytics is unable to set a cookie, then it will identify the visitor as a first time visitor. If the visitor has deleted the cookie, then Yahoo! Web Analytics will identify them as a first time visitor and re-issue a new first-party cookie.

Yahoo! Web Analytics Tracking Workflow

    Page initialization

  1. Visitor types URL into the address bar of the browser.
  2. Page starts loading.
  3. Images, .js files etc. load in the sort order as they are referred in the page, including the ywa.js file. (The ywa.js is a 10K file and is located on Yahoo!'s high-availability mirrors. The load time of this file solely depends on the browsers connection to client's web server.)
  4. Detecting support

  5. All tracking scripts and other scripts get executed that are located before the ywa.js
    1. If JavaScript is supported, the ywa.js starts running.
    2. If JavaScript is not supported, then we use third-party cookie tracking and make a pixel request. Then we go straight to step 10 and the response.

    Collecting data and handling cookies

  6. ywa.js: collects basic page and browser information (e.g., operating system, browser).
  7. ywa.js: collects other customization parameters (e.g., action, custom fields).
  8. ywa.js: sets an onLoad event (which will track downloads and exit links).
  9. ywa.js: looks for the first party cookies. If a first party cookie exists, it is appended to the request.
  10. URL request and reply

  11. ywa.js: creates a script object, and calls its source: the URL contains all the information we need to track the page.
  12. ywa.js: the script that returns may update to the first party cookie.
  13. (Typically, steps 5-10 don't take longer than 200-300ms to run, depending on the browser's connection to Yahoo! Web Analytics data collection server.)

    Attaching to page events

  14. If all the referred items have finished loading, and all the scripts have finished running, the onLoad event occurs.
  15. The original onLoad event gets executed first (if any).
  16. The Yahoo! Web Analytics onLoad event gets executed: it places an onClick event on all the links on the page, to be able to track downloads and exit links.
  17. (Typically, steps 12-13 don't take longer than 20ms to run, depending on the processing power of the visitor’s machine and the number of clicks on the page.)

    Completion of process

  18. Page finishes loading.
  19. If a download, exit link, or a manually tagged event occurs on the page, the tracking server is called again to track that event.

Sending the HTTP request

After the ywa.js has completed executing, the request to the Yahoo! Web Analytics data collection server is as follows:

http://a.analytics.yahoo.com/fpc.pl?a=1000123456789&v=5.09&enc=UTF-8 &b=Internet%20Marketing%20Company%20-%20SEO%20%26%20Pay%20Per%20Click%20Management%20Services &f=http%3A%2F%2Fwww.example.com%2F&flv=Shockwave%20Flash%2010.0%20r42 &d=Thu%2C%2018%20Feb%202010%2022%3A50%3A01%20GMT&n=5&g=en-US&h=Y &j=1920x1200&k=32&l=true&ittidx=0&fpc=e1t-e3vP%7Cm4y4WX7Jaa%7Cfses1000123456789%3D%7Cm4y4WX7Jaa%7Ce1t -e3vP%7Cfvis1000123456789%3DZj1odHRwJTNBJTJGJTJGcHVyZXZpc2liaWxpdHkuY29tJTJGJmI9SW50ZXJuZXQlMjBNYXJr ZXRpbmclMjBDb21wYW55JTIwLSUyMFNFTyUyMCUyNiUyMFBheSUyMFBlciUyMENsaWNrJTIwTWFuYWdlbWVudCUyMFNlcnZpY2Vz %7C8s001MMMoM%7C8s001MMMoM%7C8s001MMMoM%7C8%7C8s001MMMoM%7C8s001MMMoM

The request above is a standard request which does not include actions and custom fields.

Please note that in addition to this, we also store the IP address from the origin of the request, together with related demographic data based on the IP address.

URL ParameterDescriptionValue
a1000 + project id1000123456789
vTracking code version5.09
bYWATracker.setDocumentName("Home");Home
encCharacter encodingutf-8
fPage URLhttp%3A%2F%2Fwww.example.com%2F
flvOperating systemShockwave%20Flash%2010.0%20r42
dDate and timeThu%2C%2018%20Feb%202010%2022%3A50%3A01%20GMT
nTime zone offset5
gBrowser languageen-US
hJava enabledY
jMonitor resolution1920x1200
lFirst-party cookiestrue
ittidxMultiple call creation ID0
fpcCookie ID e1t-e3vP%7Cm4y4WX7Jaa%7Cfses1000123456789%3D%7Cm4y4WX7Jaa %7Ce1t-e3vP%7Cfvis1000123456789%3DZj1odHRwJTNBJTJGJTJGcHV yZXZpc2liaWxpdHkuY29tJTJGJmI9SW50ZXJuZXQlMjBNYXJrZXRpbmcl MjBDb21wYW55JTIwLSUyMFNFTyUyMCUyNiUyMFBheSUyMFBlciUyMENsa WNrJTIwTWFuYWdlbWVudCUyMFNlcnZpY2Vz%7C8s001MMMoM%7C8s001M MMoM%7C8s001MMMoM%7C8%7C8s001MMMoM%7C8s001MMMoM
cYWATracker.setDocumentGroup("Products");c=Products
caThis parameter corresponds to the submit_action() function, which triggers an action without tracking a page view.ca=1
cqYWATracker.setCmpQuery("ref=Campaign1");cq= ref=Campaign1
eTracks referring URLs.e=http%3A%2F%2Fwww.google.com%2F
oaYWATracker.setAmount("USD350.00");oa=USD350.00
ocYWATracker.setOrderId("1001");oc=1001
xtYWATracker.setTax("1.00");xt=1.00
xsYWATracker.setShipping("5.00");xs=5.00
xdYWATracker.setDiscount("2.00");xd=2.00
pYWATracker.setSKU("H84963422");p=H84963422
qYWATracker.setUnits("7");q=7
rYWATracker.setAmounts("50.00");r=50.00
xYWATracker.setAction("01");x=01
cfN
(where N = the number of the custom field
YWATracker.setCF(15, "62");

YWATracker.setCF(7, "abcdefgh");

cf1=62

cf19=abcdefgh

mYWATracker.setMemberId("john");m=john

Was this information helpful?      

My Help

Forgot your ID or password?

Sign In

Sign in to see your account information saved articles and more.
  1. Recent Searches (0)

  2. Saved Articles