Thanks. That almost works. We have multiple (one for each post) JS
twitter buttons (which convert to iframes) on a page.

According to http://dev.twitter.com/pages/intents-events

I can use target to get a DOM reference to which one was clicked:

target  a DOM node reference to HTML element or IFRAME. This value will
correspond to the original inciting DOM element. Use this value to
differentiate between different intents or buttons on the same page.

And it claims to work on Tweet buttons, but when I do this:

twttr.events.bind('click', function(event) {
alert("target:"+event.target);
});

It always results in target:null

I'm assuming there's some kind of XSS issue with the iframe? Or am I
missing something?

Thanks!


On Jun 22, 3:20 pm, Taylor Singletary <taylorsinglet...@twitter.com>
wrote:
> While we don't necessarily offer "click tracking" from within the IFRAME, we
> do have a set of hooks for the Tweet Button (and Follow Button and Web
> Intents) that will likely give you the tools to accomplish 
> this:http://dev.twitter.com/pages/intents-events
>
> You can track the clicks on the Tweet Button itself (and both of its
> regions) as well as the completion/conversion of the intended actions that
> occur within the popup (like when tweets are tweeted and related accounts
> are followed).
>
> @episod <http://twitter.com/intent/user?screen_name=episod> - Taylor
> Singletary
>
>
>
>
>
>
>
> On Wed, Jun 22, 2011 at 3:09 PM, Drew <alam...@gmail.com> wrote:
> > We have all kinds of click events on our pages to figure out how
> > people are interacting with our page. ie. someone clicks a tab here,
> > or a like button there, etc.
>
> > Since clicks on an iframe can't be accessed, other companies like
> > Facebook offer a hook into it:
>
> > FB.Event.subscribe('edge.create', function(response){
> >           //do tracking ping
> > })
>
> > Does Twitter offer something similar? If not, why not?
>
> > --
> > Twitter developer documentation and resources:https://dev.twitter.com/doc
> > API updates via Twitter:https://twitter.com/twitterapi
> > Issues/Enhancements Tracker:
> >https://code.google.com/p/twitter-api/issues/list
> > Change your membership to this group:
> >https://groups.google.com/forum/#!forum/twitter-development-talk

-- 
Twitter developer documentation and resources: https://dev.twitter.com/doc
API updates via Twitter: https://twitter.com/twitterapi
Issues/Enhancements Tracker: https://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
https://groups.google.com/forum/#!forum/twitter-development-talk

Reply via email to