About this topic

  • Posted by elizabethanne 1 month ago. There are 6 posts. The latest reply is from byron.
  • This topic is not resolved
  1. hi there! so in doing some random testing, i found that my google analytics outbound link tracking isn't working on links inside the photosmash custom fields. not sure why, but i was wondering if there was a way to add the javascript to the links? basically what would need to happen is that any time a link appeared in the custom field, it added a onclick javascript event that we can specify.

    let me know if that was confusing! thanks!

  2. I'm not fully understanding the question...Could you just put the onclick in your custom layout? Instead of using [thumb], build the whole like with href='[custom_field]' onclick='dosomething();'

    BB

  3. hi byron! hmm. i don't think that would work, because the onclick isn't on the whole element, just on the href inside the element.

    so my custom field is [photo_credits]. a sample photo credit might be (hopefully this doesn't get filtered): created by <a href="http://www.smashly.net">Smashly</a>

    so when i call [photo_credits] in my layouts editor, i would need it to output created by <a onclick="javascript:dosomething" href="http://www.smashly.net">Smashly</a>

    hopefully that made sense? thanks!

    ps - for whatever reason my "subscribe to topic via email" isn't working... just wanted to let you know. :)

  4. Hi EA,

    Could you add thad onclick through jQuery after the page is Ready()?

    if you had your custom field link in a span with a class like, span class='analyze_me', you could run those links through a jQuery function and add the .click() routine to them.

    Other than that, I'm not sure how to do it.

    BB

  5. ah, an interesting point in a good direction, thanks! i have never tried doing something like that before but i will look into it.

    thank you!

  6. welcome.

RSS feed for this topic

Reply

You must log in to post.