jekyll / jekyll-feed

:memo: A Jekyll plugin to generate an Atom (RSS-like) feed of your Jekyll posts
MIT License
847 stars 203 forks source link

Feed Tracking #177

Closed outcoldman closed 6 years ago

outcoldman commented 7 years ago

One of the simplest option to track how many users actually have read your post on RSS is to embed an 1x1 transparent image in each post. See for example RSS tracking.

It should not be hard to do

<content type="html" xml:base="{{ post.url | absolute_url | xml_escape }}">{{ post.content | strip | xml_escape }}&lt;img src=&quot;{{site.url | xml_escape}}/empty.gif?{{ post.url | uri_escape | xml_escape }}&quot; width=&quot;0&quot; height=&quot;0&quot; /&gt;</content>

And just copy the empty.gif in the root folder of _site.

This can be disabled by default and enabled with

feed:
   empty_gif: true

Of course you need to have web logs to actually track how many views you get.

It is very specific request, but possible more than just me will want it. Curious if this is something which can be considered to be merged in this project - if yes I can make a PR.

pathawks commented 7 years ago

I think this is outside the scope of this plugin.

outcoldman commented 7 years ago

@pathawks sure, understand.

But then my question will be - how I can do that with jekyll-feed plugin? My current option is to use my own feed.xml template.

Maybe we can add an option to specify custom content generator or embedded code in content?

ghost commented 7 years ago

Thinking creatively here what if atom:logo were implemented and provided to end users? Feed enhancement plus analytics, small design impact.

outcoldman commented 7 years ago

@jhabdas not sure that this will do it, considering that this is just one logo per whole feed. In my case I actually have an empty.gif per every post, so I can actually see if user opened this post or not.

ghost commented 7 years ago

Ah good point. What about that media RSS thumbnail at the bottom of the entries. Could you inline a tracking pixel into it with a data:uri?

mmistakes commented 7 years ago

@jhabdas Think you need the image to live on a server so you can track the request. A data:uri'd image wouldn't do that would it?

ghost commented 7 years ago

Ah, also a good point. Well I'm 0-2 here. 😸

jekyllbot commented 7 years ago

This issue has been automatically marked as stale because it has not been commented on for at least two months.

The resources of the Jekyll team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.

This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.