If the $DefaultImage value is blank, a 1-pixel transparent GIF image will be assumed. Replace the URL to the image in the source code. The last customization is to specify a default image to use when no image src URL is specified in the image tag that uses Mail Opens & Clicks. If no redirect code is specified, 301 will be used. If the code is 302, the browser does not remember the click URL. Thus, with 301, only the first click is logged. For subsequent clicks of that link URL, the browser bypasses Mail Opens & Clicks and goes directly to the destination. The first time a particular link URL goes to the browser, the browser goes through Mail Opens & Clicks, which logs the click and redirects the browser. If the redirect code is 301, the browser remembers the link URL of the click. When a link in an email is clicked, the click goes to the reader's browser. Either replace 302 with 301 or leave it as it is. The next customization is to specify a redirect code. If no file name is specified, logfile.csv will be used. Otherwise, it is assumed to be relative to the directory where Mail Opens & Clicks is installed. If the log file location begins with a " /" character, it is assumed to be relative to document root. Replace logfile.csv with your preferred log file location. The first customization is to specify the log file. (There are defaults for any values left blank.) There are three places to customize Mail Opens & Clicks. Customization notes follow the source code. Here is the entire source code for the Mail Opens & Clicks PHP script. The Source Code for the Mail Opens & Clicks PHP Script The "+" or "-" followed by digts, at the end of the stamp, is a time zone indication (the number of minutes plus or minus UT). ![]() The time stamp format used in this statistics CSV file looks like this. The time zone for the time stamp depends on how your PHP is configured. The "click" entry includes the destination URL. You'll see one "load" entry (meaning the image was loaded because the email was opened) and one "click" entry (meaning a link was clicked). Log email opens and/or email link clicks.īefore the source code for the Mail Opens & Clicks script, let me show you what the log file looks like. When logging a link click, the destination URL is also recorded in the log. The log includes a time stamp, the reader's IP address, an ID (probably the reader's email address), and the reader's browser identification. When a link is clicked, the click goes to Mail Opens & Clicks - which logs the click and then redirects the browser to its destination. Logging link clicks can be done with either HTML or plain text emails. When the email is opened, the image loads via Mail Opens & Clicks - which logs the image load and then sends the image to the email reading software. That's so an image tag can be put into the email - an image that loads when the email is opened. To log email opens, HTML email needs to be used. Mail Opens & Clicks can log when the email is opened or a link is clicked. In other words, Mail Opens & Clicks is independent. ![]() Mail Opens & Clicks is not emailing software and is separate from whatever emailing software you are using. Logging the statistics requires the Mail Opens & Clicks script, which comes with today's article. The statistics do not depend on the emailing software you use, so long as you can insert an img tag (to count email opens) and link URLs (to count clicks) into the outgoing email. If you run your own emailing software on your own server, that information might not have been available for you. Most emailing services provide open and click statistics for their customers.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |