Hi Joe,
I hope you can help me,
I am trying to track all twitter traffic by adding a property ?aff=tw to all URLs before the shortening happens. How can I add it?
Thank you very much for your support.
Hi Joe,
I hope you can help me,
I am trying to track all twitter traffic by adding a property ?aff=tw to all URLs before the shortening happens. How can I add it?
Thank you very much for your support.
Hmmm. There's a way to do it using a custom filter.
There's a filter applied to links prior to sending them for shortening called 'wpt_shorten_link', which excepts as arguments the link itself and the post ID for the post being handled. If you add a function to that filter that adds that attribute to the URL, that would work.
You'll want to look at the codex for add_filter:
http://codex.wordpress.org/Function_Reference/add_filter
This is fairly advanced, but WP to twitter doesn't have a system for adding custom attributes to the URL. Alternately, you can add a URL in a custom field that you use instead of the default permalink; but that would be more labor intensive in the long run.
You must log in to post.