Giter Site home page Giter Site logo

mandrill-integration-for-google-analytics's Introduction

Mandrill Integration for Google Analytics

Overview

Overview Diagram

This integration allows you to import your e-mail event data like opens, clicks or bounces from Mandrill into Google Analytics for a single interface dashboard and deeper e-mail performance analysis.

This integration is based on webhooks so data is ready in nearly real-time.

Features

Supported e-mail events:

  • Send
  • Open
  • Click
  • Spam
  • Hard Bounce

This integration allows you to explore your data by the following dimensions:

  • E-mail type, in case your application have different e-mail types
  • Device category (mobile, desktop, tablet)
  • Geographic location (city, country...)
  • Hostname (domain)

Universal Analytics user_id feature is also supported.

Example

Google Analytics Example

How to set up

1) Install the webhook processing script in your server

First, install the webhook processing script in your server. PHP sample code is available here, but you can use any other server side language if you prefer.

2) Add the webhook your Mandrill account

From your Mandrill account, go to Settings > Webhooks > Add a Webhook.

Fill the form using the following settings:

Webhook Settings

Please do not forget to replace the "Post To URL" field with the actual URL your webhook processing script is located.

3) Create custom metrics in Google Analytics

From your Google Analytics account, go to Admin > Custom Definitions > Custom Metrics.

Google Analytics Panel

Then create these custom metrics:

Name Scope Index Type Min. Value Max. Value Active
Sent hit 1 integer - - Yes
Opens hit 2 integer - - Yes
Clicks hit 3 integer - - Yes
Marked as Spam hit 4 integer - - Yes
Bounces hit 5 integer - - Yes

4) Install custom report in Google Analytics

Install this Google Analytics custom report into any data views in your account.

5) Optional: pass email_type and/or user_id to Mandrill e-mail metadata fields

In case your web application uses different e-mail types and you want to segment your data based on this dimension or you want to take advantage of the Universal Analytics user_id feature, please set your application to be pass the email_type and/or user_id metadata fields to Mandrill at the time of sending new e-mails.

Additional Resources

mandrill-integration-for-google-analytics's People

Contributors

antoniotajuelo avatar

Watchers

James Cloos avatar GrigoriyTsarik avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.