We need the ability to either hook in or specify the format of the targeting values. IE. Lowercase and replace underscores/spaces with hyphens.

The DART module used to let us hook in with dart_key_vals() to do this type of formatting. Sadly the hooks currently provided by DFP are before they have been run through token_replace and dfp formatting function (dfp_format_targeting()).

As I see it, this could either be accomplished by some settings in the admin form (checkboxes for lowercase and perhaps an imput field on how to format) or provide another hook just after the value has been returned from the token_replace() function.

What are your thoughts on this? Or is there already a way to do this that I'm missing?

CommentFileSizeAuthor
#1 dfp-alter-target.patch467 bytesbleen

Comments

bleen’s picture

Status: Active » Needs review
StatusFileSize
new467 bytes

the reason that this was suck a big deal with the DART module was because there was a limit to how long the query string can be. With dfp's new GPT tags this is no longer an issue.

if we were to add this I definitely would not want to add any more settings ... the gui is confusing enough as-is.

A simple drupal_alter may be fine, though I worry about the performance implications.

jarrodirwin’s picture

This works perfectly for my use case.

Like you said however, performance might take a slight hit if there are a large number of values being targeted. I don't imagine it being too much of an issue though.

bleen’s picture

Status: Needs review » Fixed

committed this

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.