Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Google analytics pageviews/events are logged with the pixel call to ga servers and the sessions are tracked with the GA cookie. Now there are multiple problems with trying to track email opens and preserving sessions.</p> <ol> <li>Not all clients fetch the images by default.</li> <li>When server-side api is used to track the event like in case of php-ga, ga cookie is still not set till user actually clicks through and lands on an actual page which requests ga pixel and thus sets the cookie with a new sessionID.</li> </ol> <p>To go around this, one could use only the server api on all page views. One would then be able to </p> <ol> <li>Serialize the php-ga Session object to client session in email open call.</li> <li>On normal page view, if there is a session information, unserialize it and construct the GoogleAnalytics\Session object before passing it in trackPageView call.</li> </ol> <p>This approach, however, will require re-designing the entire ga tracking scheme and replace javascript api usage with php-ga. There is a possible work-around which involves creating the ga pixel url and setting it as src attribute in your mails. This approach has been discussed <a href="https://stackoverflow.com/questions/4456592/tracking-email-opens-in-google-analytics">here</a>, and detailed description <a href="https://developers.google.com/analytics/devguides/collection/other/mobileWebsites" rel="nofollow noreferrer">here</a>. The documentation, however mentions that you need to use mobile specific tracking code for creating the url, so it might or might not still combine the sessions. But it still looks pretty close to simulating seamless tracking of opens and clicks in email campaigns. </p> <p>Even if this setup works, the email opens that do not happen on a web browser (in case of mail clients like Outlook or Mail), the events will still not be in the same session. Hope this helps.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload