Skip to content
Shubhajit Saha edited this page Jun 1, 2016 · 6 revisions

Setup instructions

First, log in to your Google Analytics account and set up a new property:

  • Select "Website", use new "Universal Analytics" tracking
  • Website name: anything you want (e.g. GitHub projects)
  • WebSite URL: https://ga-beacon.appspot.com/
  • Click "Get Tracking ID", copy the UA-XXXXX-X ID on next page

Next, add a tracking image to the pages you want to track:

  • https://ga-beacon.appspot.com/UA-XXXXX-X/your-repo/page-name
  • UA-XXXXXXXX-X should be your tracking ID
  • your-repo/page-name is an arbitrary path. For best results specify the repository name and the page name - e.g. if you have multiple readme's or wiki pages you can use different paths to map them to same repo: your-repo/readme, your-repo/other-page, and so on!

Replace "ga=UA-XXXXXXXX-X" in blob/master/opsworks/custom.json#L17

blob/master/application/libraries/Lib_message.php#L162-198

    // 2. GA stats (event: click)
    // Campaign Source    utm_source=[list]
    // Campaign Name      utm_campaign=[message_id]
    // Campaign Medium    utm_medium=email
    // Campaign Content   utm_content=hyperlink

    // 3. GA stats (event: open)
    // Version            v=1
    // Events             t=event&ec=email&ea=open
    // Tracking ID        tid=UA-XXXXX-Y
    // Client ID          cid=[list_id]
    // User ID            uid=[recipient_id]
    // Campaign Source    cs=[list]
    // Campaign Name      cn=[message_id]
    // Campaign Medium    cm=email
    // Document Path      dp=/email/open/{_request_id}
    // Document Title     dt=[subject] The document title (&dt) should be the subject line of the email.
    // Document Encoding  de=UTF-8

Clone this wiki locally