1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How can i track link click in custom html email template?

Discussion in 'PHP' started by creativewebmaster, Aug 28, 2015.

  1. #1
    Hello Guys,

    I have email template. There are couple of links to go to third party site. So, I need track that how many users click on that. If you know any PHP or Jquery code or Any reference URL for link click track for email template so please help me.

    Thanks in advance.
     
    creativewebmaster, Aug 28, 2015 IP
  2. dblane4

    dblane4 Member

    Messages:
    27
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    28
    #2
    I found an Article here, http://www.labnol.org/internet/google-analytics-track-email-clicks/2476/
    This may help you, Look for the section "Track Clicks on Links That Point to External Websites" on that page.
     
    dblane4, Aug 28, 2015 IP
  3. creativewebmaster

    creativewebmaster Active Member

    Messages:
    654
    Likes Received:
    7
    Best Answers:
    4
    Trophy Points:
    78
    #3
    Thank you for your quick feedback. The Article is to track analytic records. I need actually email template content click track.

    Thanks,
    Nilesh
     
    creativewebmaster, Aug 31, 2015 IP
  4. the_geoff_word

    the_geoff_word Peon

    Messages:
    4
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    1
    #4
    As far as I know the only way to track clicks from an e-mail is to intercept them, log the click and then forward the user to the desired address. So for example, you would set up a php script on your own server with a url like mysite.com/emailclick.php and make the following happen:
    1. All link urls in the e-mail template have the format http://mysite.com/emailclick.php?url=http://targetsite.com/whatever-page&email=name@email.com,
    2. When the user clicks on a link they go to the PHP script on your server,
    3. Your PHP script logs the e-mail and target url of the click in a database,
    4. Your PHP script forwards the user to the target url by returning a code 301 or 303 in the header.
    This would all be largely transparent to the user. If they looked, they would notice that all the urls in the e-mail links point to your server, but the actual operation that occurs when they click should happen fast enough that they think they are clicking directly through to the target url.
     
    the_geoff_word, Sep 16, 2015 IP
  5. ProxyRadar

    ProxyRadar Greenhorn

    Messages:
    22
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    20
    #5
    Place at your host a script, which will redirect to third party sites and keep statistics of such redirects, you can provide to script an id of mailing, or even id of each client email
     
    ProxyRadar, Sep 18, 2015 IP