Profile

Cover photo
Sébastien Brodeur
55,941 views
AboutPostsPhotos+1'sReviews

Stream

 
Does anyone have already use the GA Management API to do data import (uploading) from a Google Spreadsheet script? It seem the uploadData need a application/octet-stream. Is it possible to create such stream using Google Apps script?  (something like: 'data:Application/octet-stream,' + encodeURIComponent(data);
4
1
André Mafei's profile photoSébastien Brodeur's profile photo
4 comments
 
Here the complete Google Apps Script:

var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
var values = rows.getValues();
var data = "";
for (var i = 0; i <= numRows - 1; i++) {
  for (var j = 0; j <= values[i].length - 2; j++) {
    data = data + values[i][j] + ",";
  }
  data = data + values[i][values[i].length - 1] + "\n"
}
var blob = Utilities.newBlob(data, "application/octet-stream");
Analytics.Management.Uploads.uploadData('XXXXXX', 'UA-XXXXXX-X', 'XXXXXXXXXXXXXXXXXXXXXXXX', blob);

uploadData take 4 parameters. The first one is the GA Account, then the property, the third one is the upload API key for the specific data source and the last one is the data (formated as CSV and transform into a blob.)

Enjoy!
Add a comment...

Sébastien Brodeur

General Questions  - 
 
Does anyone know a plugin that would fire GTM events when people interact with a Twitter Bootstrap UX (Ie.:  trigger a GTM event when someone open a accordion, a carousel item is showed/clicked, etc) ?

(Using jQuery and CSS selector, this can be done easily, but why wrote code someone may have already wrote for me ? :-)
1
Stephane Hamel (inactive)'s profile photoSébastien Brodeur's profile photo
5 comments
 
That what I did with my mousedown auto-event (click auto-event are often broken because of return false;, mousedown is pretty much left alone by developer :-)  And as a bonus, you can bypass the fact that right and middle click button doesn't throw a click event.
Add a comment...

Sébastien Brodeur

General Questions  - 
 
Are GTM custom JS macro call only when the tag using it is called?
1
Stephane Hamel (inactive)'s profile photoBrian Kuhn's profile photoSébastien Brodeur's profile photo
5 comments
 
My bad, I readed too fast :-)
Add a comment...

Sébastien Brodeur

Shared publicly  - 
 
Ça vaut grandement le 5 min. que ça prend à lire.
 ·  Translate
1
Add a comment...

Sébastien Brodeur

Shared publicly  - 
 
En 2010 j'ai tenter l'aventure d'un projet 365. (https://www.flickr.com/pho…/brodseba/sets/72157623355271035/) C'est à dire, une photo par jour pendant 1 an.Je ne me suis pas rendu jusqu'au bout, mais j'ai beaucoup appris pendant l’exercice.

Plus de 5 ans après, j'ai décidé de retenter l'expérience. Je crois que c'est le coup de pied au cul dont j'ai besoin. Le plus difficile dans ce genre de projet n'est pas de faire une photo par jour, mais de faire une photo par jour intéressante.

Pour ma première journée, disons que mon beau plan que j'avais en tête a pris le bord. En effet, je désirais faire un auto-portrait avec flash studio dans mon salon, mais j'ai réalisé que j'ai oublié une pièce de mon trépied chez une amie, j'ai donc dû trouver un plan B rapidement.

Je vous présente donc ma première image. Un début modeste (j'aimes la lumière mais pas le composition) mais il se fait tard.
Je tenterais de publier ma photo à chaque soir. Au plaisir.
 ·  Translate
En 2010 j'ai tenter l'aventure d'un projet 365. C'est à dire, une photo par jour pendant 1 an.Je ne me suis pas rendu jusqu'au bout, mais j'ai beaucoup appris pendant l’exercice. Plus de 5 ans après, j'ai décidé de retenter l'expérience.
1
Eric Taillefer's profile photoSébastien Brodeur's profile photo
2 comments
 
J'aimerais bien m'y mettre. J'ai acheté une harmonica il y a quelques semaines, mais j'ai pas encore commencé à pratiquer. :-)
 ·  Translate
Add a comment...
 
Hi, there is a lot of talk about semalt.com traffic on site.  Does the "bots filtering" features will detect and remove these traffic?  If not, I really suggest Google to add them to the list of know bots.
3
Yago Perez's profile photo
 
Semalt is not a bot, its a website ;) You can get those referrals removed by modifying your htacess
Add a comment...

Sébastien Brodeur

Shared publicly  - 
 
How to use the Management API with Google Apps Script to upload data into GA directly from a Google Drive Spreadsheet.
 
Does anyone have already use the GA Management API to do data import (uploading) from a Google Spreadsheet script? It seem the uploadData need a application/octet-stream. Is it possible to create such stream using Google Apps script?  (something like: 'data:Application/octet-stream,' + encodeURIComponent(data);
1
Add a comment...

Sébastien Brodeur

Shared publicly  - 
 
 
TamperMonkey (inject GTM - or anything!) on ANY website

Using this technique, you can quickly jump start your implementation by automatically adding the GTM container on the website, without waiting for their dev team to deploy it. This effectively allow you to do most of the implementation and tests without even altering the website!

Note, however, that if you use a dataLayer approach, you might have to forge some fake data or still scrape the DOM to populate a temporary dataLayer that will be replaced once your real code is in place (refer to https://plus.google.com/u/0/+StephaneHamel/posts/JVX9CF37Tdf for a discussion about DOM scraping vs Data Layer techniques)

1) Install +Tampermonkey  from https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo
2) Create a new TamperMonkey script with the following info - don't forget to replace the @include line and the GTM container id GTM-ABC123 with yours (note: in some cases, we have to add a 500ms delay before injecting our code)

// ==UserScript==
//@name      Name of your script 
//@namespace http://use.i.E.your.homepage/
//@version   0.1
//@description Inject GTM bootstrap on my website
//@include    http://mywebsite.com/* [wildcard url where TM should inject the code]
//@copyright 2014, shamel@cardinalpath.com
// ==/UserScript==

// Google Tag Manager
setTimeout("(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':"+
"new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],"+
"j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.src="+
"'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);"+
"})(window,document,'script','dataLayer','GTM-ABC123');"+
"console.info('GTM injected');",500);
// End Google Tag Manager

3) Under the Settings tab, set the following:
a) Position: 2
b) Run at: document-body
c) run only in top frame: default
1
Add a comment...

Sébastien Brodeur

General Questions  - 
 
I try to push a version in Preview and Debug mode, but GTM web interface started to reload (showing a Loading... yellow banner) but nothing happend.  Also, when I try to access the web site, no debug info are showing and the GTM tags doesn't loaded. The same version of the tagging work fine if a publish it.  Any idea why?  I already try to disable all my Chrome plug-ins.
1
Johan Björtin's profile photoSébastien Brodeur's profile photoStephane Hamel (inactive)'s profile photoFares Alhassen's profile photo
13 comments
 

From https://plus.google.com/101103411514691389259/posts/SHB5y6W3UY4:

+Brian Kuhn 
"Re: debug mode, the current issue is due to macros that push onto the dataLayer. To be clear, this is only an issue in debug mode; production containers are unaffected. We'll probably find a way to fix debug mode for this case, but this is also something you should try to avoid. Macros should not have side effects; the results are too unpredictable (and unspecified) otherwise."
Add a comment...

Sébastien Brodeur

Shared publicly  - 
 
That the problem, existing attribute vary from site to site. So I want to create a layer of attribute dedicated solely to tagging. Something that will be compatible with all sort of CMS, because the look and feel of most web UX component will be standardize (but not how there are implemented.)
 
I'm planing to write tagging specs to be use on multiples Web assets that uses multiples CMS technology.  For visitors and pages level data, it make sense to me to use dataLayer. But for DOM events tagging, I'm not sure.  In the past, I have been able to do a lots of "miracles" using AE-Listener and doing stuff like: {element}.parentNode().parentNode().text() but I realize all the hassle this is to support on multiple site (not all the site implement the web UI component the same way, so the CSS and HTML structure may be different.)

For example, I wishes to track when user open a accordion (a web UI component.)  I'm not sure which method I should use to pass data like label and accordion state (open or close) to GTM.

Should I use:
 - CSS classes (<span class="gtmAccordionTitle">Some title</span>)
 - Data-attribute (<span data-accordion-title="Some title">Some title</span>)

For simple data (label) it seem easier to use CSS classes VS data-attribute (no need to duplicate the data, compatible with 99.9% of all CMS.)  But for other data, data-attribute would be easier (ie.: data-accordion-state="open".)

Any thoughts?
1
Add a comment...
Story
Tagline
Data and optimization enthusiasm
Apps with Google+ Sign-in
  • OhMiBod
Sébastien Brodeur's +1's are the things they like, agree with, or want to recommend.
ROI Revolution - Paid Search Management, PPC, Website Analytics, Optimiz...
www.roirevolution.com

What Our Clients Say: “Their actions meet their intentions”. ROI Revolution client since 2008. Photos on canvas provider with 65 employees.

Retour sur le eMetrics Tour Montréal 2013 » Go-referencement.org
www.go-referencement.org

Mercredi dernier a eu lieu l'événement eMetrics Tour Montréal, une conférence autour de l'analytique web, discipline qui prend de plus en pl

Google Drive
drive.google.com

Access everywhere. Google Drive is everywhere you are—on the web, in your home, at the office and on the go. So wherever you are, your stuff

Cause, Effect, and Split Testing | Testing &amp; Usability
online-behavior.com

One of the topics web analysts often deal with is causality between what a visitor sees and what they do. Learn more about causality and tes

Personalization - Response Based Segmentation Strategy | Targeting &amp;...
online-behavior.com

You only have one chance to create your first impression. Learn how to select the main message for your homepage in order to target each of

• Page d’index
www.astro-quebec.com

Astronomie: Sujets: Messages: Dernier message. Astrophotographie: La galerie. Ce forum se veut un lieu de discussion et d&#39;échange pour t

Bref. Je suis vieille. - Episode du 20/02
www.canalplus.fr

Dans la vie, au début on naît, à la fin on meurt. Entre les deux il se passe des trucs, bref ...

Online Behavior
plus.google.com

Marketing Measurement &amp; Optimization

Space inside by Sasha Levin
500px.com

http://sashalevin.livejournal.com

Top Three Characteristics of Data Driven Organizations | Analytics &amp;...
online-behavior.com

Learn more about what makes a data-driven company. Being data-driven is the art and ability to leverage all business assets to exercise judg

Google Analytics Blog: Introducing the Google Analytics Core Reporting API
analytics.blogspot.com

Labels. Advanced Topics (55); AdWords (10); Analytics API (31); Announcements (91); Back to Basics Series (28); Beginner Topics (41); Busine

The Google+ Project
www.google.com

The Google+ project makes sharing online more like sharing in real life. Take the interactive tour for a quick look at five of the first key

Sword of Orion by Levin Dieterle
500px.com

Photo portfolio of Levin Dieterle on 500px.

Services | Sébastien Brodeur, Photographe de Montréal
un-photographe-de-montreal.com

J'offres mes services comme photographe. Maternité, Portfolio, portrait de famille.

» Le Québec est en deuil | Stéphane Laporte
blogues.lapresse.ca

Surtout que ce geste de folie ne provoque pas encore plus de haine et d’accusations. Qu’il ne nous divise pas. C’est le temps d’être au-dess

Ce centre de service est fermé définitivement.
Public - a year ago
reviewed a year ago
1 review
Map
Map
Map