Criteo module for Drupal

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
greggles's picture

I'm investigating the Criteo retargeting platform. I'm about to create a Criteo module for Drupal.

It seems like they expect you to add javascript onto a few pages:

  • Homepage
  • Category/Listing pages
  • Product pages
  • Basket pages
  • Conversion tag

My plan was to provide some APIs that build up static arrays of information to insert into a given page and then some functions that are added, perhaps in a theme preprocess function or somewhere pretty late in the theming process (maybe a function to manually insert into page.tpl.php?) that would get the right functions.

In that way, the criteo.module wouldn't do anything on its own. But someone who wanted to use it would add code in, e.g., a custom hook_node_view that would call the criteo.module API to alert the Criteo module to

  1. add the criteo js loader to the footer using drupal_add_js
  2. add appropriate criteo tags

I can imagine that a standardized module could be built for Drupal Commerce and/or Ubercart to integrate with Criteo, but that wouldn't be a goal of mine.

Comments

Well, there you go

greggles's picture

Well, there you go https://www.drupal.org/project/criteo

Testers are invited to try it out. It doesn't do much on its own. You have to write your own module that will call:

  • _criteo_events for a trackTransaction event
  • _criteo_events for a viewBasket event
  • _criteo_view_list for listings

I've just pushed an

matt2000's picture

I've just pushed an example_criteo module to demonstrate a sample implementation. It should be trivial to adapt this to work with Ubercart or Commerce module, for example, or your Drupal ecommerce solution of choice. If it's not trivial because of some design decision in Criteo module, that's a bug, please file an issue. :-)

Advertising

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: