Counting does not seem to work with other URL shortening services


#1

Hi,

This used to work, I am sure (but could be wrong), but when requesting a count of a tweeted URL, which is URL shortened, it is no longer counting. (Possibly related to your ongoing count issues, if so, that’s fine, just like to know :slight_smile: )

For example:

https://cdn.api.twitter.com/1/urls/count.json?url=http%3A%2F%2Fmjobx.com%2FOYGIAA&callback=twttr.receiveCount

https://cdn.api.twitter.com/1/urls/count.json?url=http%3A%2F%2Fgoo.gl%2FaAZ3i&callback=twttr.receiveCount

https://cdn.api.twitter.com/1/urls/count.json?url=http%3A%2F%2Ftinyurl.com%2F78q9jzj&callback=twttr.receiveCount

https://cdn.api.twitter.com/1/urls/count.json?url=http%3A%2F%2Fwww.wileyjobnetwork.com%2Fjob%2F565395%2Fclinical-research-associate-fai-un-salto-di-qualita-%2F%3Futm_source%3Dtwitterfeed%26utm_medium%3Dfeed%26utm_campaign%3D7%26ProcessedTrackID%3D41880&callback=twttr.receiveCount

The top 3 do not count, yet the bottom one does, but all 3 shortened URLs point to the same URL as the 4th (well, technically the 1st points to another URL, that then gets 302’d to the final URL). Something else I’ve noticed, is that on your response, you seem to strip out some utm_ parameters from the query string? I don’t think it’s having any effect, just curious why you do it. I.e, the end URL in full is: http://www.wileyjobnetwork.com/job/565395/clinical-research-associate-fai-un-salto-di-qualita-/?utm_source=twitterfeed&utm_medium=feed&utm_campaign=7&ProcessedTrackID=41880, yet the response from your counter is:

twttr.receiveCount({"count":3,"url":"http://www.wileyjobnetwork.com/job/565395/clinical-research-associate-fai-un-salto-di-qualita-/?ProcessedTrackID=41880"})

#2

Are you using the Tweet Button for these counts or are you actually making API calls to these endpoints? The general counting issues are still a thing and likely at least partially to blame here. We strip out utm_* parameters as a common “meaningless” params for the purpose of counting (they’re used by analytics trackers). However, we do consider most other query parameters as significant in a URL. Are you declaring these tinyurls in your Tweet Button markup?


#3

We’re directly calling the API, we’re not using the tweet buttons as such (we create our own, rather than use the “SDK” provided by you), and not using the cdn.api.twitter.com url, but urls.api.twitter.com/, both URL types provide the same behaviour though.


#4

You are not permitted to request from urls.api.twitter.com – it’s not a public API.


#5

I tried this and it works:

Tweets {amin}

#6

It may work, but you’re not allowed to do it.


#7