Adding javascript tag in XML feed

Discussion in 'XML' started by affiliateian, Nov 10, 2006.

  1. affiliateian

    affiliateian Guest

    Total newbie here for this so please be patient.

    We manually update our XML feed when we publish an article on our
    website. Can we add a javascript tracking pixel (from phpadsnew) into
    the XML file to track how many times our feed was accessed? Just to get
    a rough idea how manyh subscribers we have?

    Not sure if copying and pasting a javascript into the XML source would
    work.

    Any thoughts?
     
    affiliateian, Nov 10, 2006
    #1
    1. Advertisements

  2. The "tracking pixel" trick counts on the browser following the HTML's
    instruction to fetch an image. Depending on how the XML is being
    processed, it may not be going through a browser and images may not be
    being fetched.

    So the answer is an extremely emphatic "It Depends."

    Why not just instrument the server to directly report how often the file
    is fetched?
     
    Joe Kesselman, Nov 10, 2006
    #2
    1. Advertisements

  3. affiliateian

    affiliateian Guest

    Hi Joe,

    Any tips on this one? I have access to Cpanel and root access. I am not
    versed in programming but can following instructions. Any tips would be
    great!
     
    affiliateian, Nov 10, 2006
    #3
  4. affiliateian

    Andy Dingley Guest

    I presume you mean an RSS feed here.

    Can we add a javascript tracking pixel (from phpadsnew) into
    This is a lot of questions, so I'll try to deal them one-by-one.

    RSS is a syndication protocol, although it's usable (and used) in two
    ways. One is to supply a "summary" feed, where the feed is used as
    teasers and links into a site. The other is to send sufficient
    "content" embedded in the feed items that users read everything they
    might wish to from reading the feed itself (usually long text articles,
    but images are still puled from the source site). Obviously both of
    these applications of the technology have quite different meanings for
    "user" and "to read", meanings that affect the relevant stats you want
    to count.

    In a pure "content" RSS feed, you just can't count the "readers" unless
    you embed deliberate tracking, because you've already published and
    permitted redistribution of everything they need to make the content.


    Now the tech issues.

    You can't "add JavaScript"

    You might get the same results as adding JavaScript by finding what
    that JavScript does, then doing that directly. A "JavaScript tracking
    pixel" is just a tracking pixel that's embedded in a page by using a
    <script> tag rather than am <img> tag (it works no better, but it can
    be easier for content authors to set up). If you find what the URL to
    the image is (probably complex and with a site id embedded in it) then
    you can add that pixel to the RSS feed.

    Adding an image to an RSS feed item like this usually involves sending
    some encoded HTML in the description elements for the feed items. That
    itself isn't trivial -- some blog publishing engines do it well, other
    quite serious RSS creators do it badly or almost not at all. We'd have
    to know just how your feed is created to advise further.

    If you're really capable of doing this, then (IMHE) you can set up your
    own "web bug" pixel tracker, hosted on your own server, and do it that
    way. This avoids paying money to a tracking service, loses the ability
    to cross-reference users with their browsing habits on other sites, but
    best of all it's likely to still work for privacy-sensitive readers who
    block web bugs from known tracking companies.
    What's a "subscriber" ? Subscriber to the field, or someone who later
    reads your syndicated content?

    If you want to count the feed subscribers, then look at your server
    logs. If you want to count the reading eyeballs, then embedded web bugs
    are a practical way.
     
    Andy Dingley, Nov 10, 2006
    #4
  5. affiliateian

    affiliateian Guest

    Hi Andy,

    Thank you for the detailed reply. Know that it's very mcuh appreciated.

    At the end of the day, we want to measure how many people have either:

    1. Subscribed to our RSS feed
    2. How many people are reading our feed

    Sounds like we first need to look into the logs and count how many
    times our feed.xml file was accessed? This, I am hopng, is a rough
    estiamte as to how mnay users may be reading our feed.

    Does that work?
     
    affiliateian, Nov 10, 2006
    #5
  6. affiliateian

    Andy Dingley Guest

    Depends what the feed is. Do people who "read" your feed do it by
    following links from your feed back to your web pages, or do they read
    something that's entirely contained in what you supply with the feed?

    If it's the first (most common), then ignore RSS and just track the web
    traffic.

    If it's the second, you need to embed a tracking pixie in the HTML
    description.
     
    Andy Dingley, Nov 11, 2006
    #6
  7. affiliateian

    affiliateian Guest

    Our feed contains the first paragraph of new articles + a link. So this
    means we can use a javascript tag within the most recent article
    description tag of the XML file, this should work?
     
    affiliateian, Nov 11, 2006
    #7
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.