Hi all
we are using this module to add tracking codes and I needed to add the Search tag. Since it needs an array of data, I had to add a function to pass the extra information. I will attach a patch in my next comment.

/**
 * Provides additional detail for the Facebook Pixel Search tag.
 *
 * @param string $search
 *   Search string to track.
 *
 * @return array
 *   Array of data.
 *
 * @usage facebook_pixel_add_event('Search:' . $search_string);
 * @see facebook_pixel_node_view()
 */
function facebook_pixel_data_Search($search) {
  return array(
    'search_string' => $search,
  );
}
CommentFileSizeAuthor
#2 facebook_pixel-search_tag-2880758-2.patch716 bytesmarkie

Comments

markie created an issue. See original summary.

markie’s picture

StatusFileSize
new716 bytes

Patch as promised.

web226’s picture

Thanks for the patch!

anybody’s picture

Component: Code » Code (General)
Status: Active » Needs work

Why does the function have a captial "S"? The rest makes sense, I guess.

anybody’s picture

Status: Needs work » Closed (outdated)

No review since 5 years. Furthermore I don't get where facebook_pixel_data_Search is called, especially with the captial "S".

Feel free to reopen with details and review.