NOTE: Google no longer supports the legacy tags supported by this module. While they still work (assuming you set a "network id") you should use the DFP module instead.

General Information

The DART module provides DART ad tag support for Drupal sites that use Doubleclick as their ad delivery network.

Requirements & Enhancements

Some of the information required by this module must be obtained from Doubleclick. See doubleclick.com for more details.

  • The 2.x Branch requires ctools
  • The 2.x Branch requires libraries api
  • The 2.x Branch integrates with the contexts module for "display rules"
  • (6.x) Although not required, all of the admin screens look *MUCH* better and are *MUCH* more usable if you use vertical tabs and if you use the Rubik admin theme.

Usage

You can create DART tags and display them either as a block or by inserting a simple print dart_tag('banner'); into your theme. Every DART tag can include several different type of key|val pairs:

Static key|val pairs
These pairs do not ever change programmatically. They can be added to all tags globally or to individual tags.
Evaluated key|val pairs
These key|val pairs have an "evaluate as javascript checkbox". For example a value like i++ would need to be evaluated as javascript.
Programmatic key|val pairs
These key|value pairs can be added by using hook_dart_get_vars(). These pairs typically have a different value on each page request (often based on URL, or taxonomy terms, or users) and can be set by using the dart_get_vars hook. (ex. section)

Hooks & Overrides

For more complex implementations module developers and themers can take advantage of these hooks and overrides to customize the dart settings on each page request:

  1. hook_dart_tag_alter(&$tag) - this is called immediately after a tag is loaded
  2. hook_dart_key_vals($tag) - use this to add/alter a key|value pair to a tag.
  3. hook_dart_term_formatters() - add your own handler for how taxonomy terms are displayed within tags
  4. Finally, you can override a completely rendered tag at the very last second by including the following js in your module:
      $(document).bind('dart_tag_render', function(event, tag){
        // modify tag however you see fit and then return it.
        // example: 
    
        tag = tag + '12345';
        return tag;
      });
    

Updating from DART 6.x-1.x

The 6.x-1.x branch is no longer being developed. Only major bug fixes (or security fixes) will be worked on. If you are using that branch it is recommended that you update to the 6.x-2.x branch. To upgrade, follow these steps:

  1. Backup everything & put your site in maintenance mode
  2. Install and enable ctools if its not already installed on your site. If you use the "display rules" currently then you might also want to install context. (Note: current display rules will be lost during this update - sorry).
  3. Delete all the files form the existing /dart folder (Several files and folders have become obsolete.
  4. Download the 6.x-2.x version of dart
  5. Run /update.php. At this point all of your existing dart tags will autmagically be assigned a "machine name" (the dtid has be deprecated).
  6. Any of your tags that are displayed as a block, will work fine. If you had any calls to print dart_tag($dtid); in your theme, you will need to change those to print dart_tag($machinename);. The machine name can be found on the /admin/build/dart_tags page.
  7. If you had been using hook_dart_key_vals(), the array being altered has changed its structure a bit; you'll need to make some minor changes (instead of $array['key'] => array('val'=>'foo', 'eval'=>TRUE), you'll want to use $array[] = array('key'=>'bar', 'val'=>'foo', 'eval'=>TRUE). this way you can have multiple values for the same key.)
  8. If you had been using hook_dart_site_zone() You'll want to start using hook_dart_tag_alter() instead.
  9. If you had been using "display rules" in 1.x you'll want to install the context module instead and use that to show/hide ad tags depending on users, pages, views, paths, etc... Unfortunately there is no upgrade path for your existing display rules.
  10. Test, test & test some more. When your satisfied, take your site out of maintenance mode

Related Modules

You may also want to check out:

Project information

  • caution Minimally maintained
    Maintainers monitor issues, but fast responses are not guaranteed.
  • caution Obsolete
    Use of this project is deprecated.
  • chart icon1 site reports using this module
  • Created by bleen on , updated
  • shieldStable releases for this project are covered by the security advisory policy.
    Look for the shield icon below.

Releases