Git Product home page Git Product logo

googleanalyticstomarketingcloud's Introduction

googleAnalyticsToMarketingCloud

Node app to pull data from Google Analytics and post into a Salesforce Marketing Cloud Data Extension.

This assumes your utm variables are as follows...

VARIABLE VALUE
utm_medium email
utm_term %%=Format(Now(true),''yyyyMMdd'')=%%
utm_source typeOfEmail (we use %%__AdditionalEmailAttribute1%% for this)
utm_campaign emailName (%%emailname_%%)

You must also create a data extension within Marketing Cloud with an external key of google-analytics that has the following info...

Name Data Type Length Primary key
campaign Text 100 Yes
keyword Text 8 Yes
source Text 100 No
sessions Number No
bounces Number No
bounceRate Decimal 20,10 No
transactions Number No
transactionsPerSession Decimal 20,10 No
transactionRevenue Decimal 12,2 No
transactionRevenuePerSession Decimal 20,10 No

No nullables, empty default values. This assumes what makes an email unique is the campaign name and keyword combo.

This also uses mailgun to email someone if there's ever an error. There are comments in the code that talk about this.

googleanalyticstomarketingcloud's People

Contributors

danieldrasdo avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ajaykumar127

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.