Title: tag manager google
Last modified: August 22, 2016

---

# tag manager google

 *  Resolved [leblanc1](https://wordpress.org/support/users/leblanc1/)
 * (@leblanc1)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/tag-manager-google/)
 * What code I need to add to my theme functions.php son customizr to add tags manager
   google ?

Viewing 15 replies - 1 through 15 (of 35 total)

1 [2](https://wordpress.org/support/topic/tag-manager-google/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/tag-manager-google/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/tag-manager-google/page/2/?output_format=md)

 *  [Rocco Aliberti](https://wordpress.org/support/users/d4z_c0nf/)
 * (@d4z_c0nf)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/tag-manager-google/#post-5794126)
 * Hi leblanc1,
    what do you mean? Do you have a code and want to put in the child-
   theme functions.php? Which code this one? [https://developers.google.com/tag-manager/quickstart](https://developers.google.com/tag-manager/quickstart)
   And you have to place it just after the body tag right? So something like this:
 *     ```
       add_action('__before_header','my_google_tag_manager', 0);
   
       function my_google_tag_manager() {
       ?>
   
           YOUR GOOGLE TAG MANAGER CODE HERE
           (looks like <script type="text/javascript">.....</script> )
   
       <?php
       }
       ```
   
 * hope this helps.
 *  Thread Starter [leblanc1](https://wordpress.org/support/users/leblanc1/)
 * (@leblanc1)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/tag-manager-google/#post-5794151)
 * hi de4z_c0nf ,
    presents the following error syntasix Warning: call_user_func_array()
   expects parameter 1 to be a valid callback, function ‘my_google_tag_manger’ not
   found or invalid function name in /var/www/vhosts/anacastrolopez.es/httpdocs/
   wp-includes/plugin.php on line 470
 *  [Rocco Aliberti](https://wordpress.org/support/users/d4z_c0nf/)
 * (@d4z_c0nf)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/tag-manager-google/#post-5794160)
 * Hi leblanc1,
    sorry don’t know what you wrote, but just copying the code above
   and put it in my child-theme functions.php doesn’t give me any error. Also that
   kind of warning (not a syntax error) happens when the callback here `add_action('
   __before_header','my_google_tag_manager', 0);` points to a function which doesn’t
   exists. But as you can see just below that line we define the function: `function
   my_google_tag_manager() {`.
 * Would you paste the content of your child-theme functions.php in pastebin.com
   and then copy/paste the link here?
 *  Thread Starter [leblanc1](https://wordpress.org/support/users/leblanc1/)
 * (@leblanc1)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/tag-manager-google/#post-5794163)
 * ok , I’ll return one set label manager tag google . Then I say, if I can successfully
   install manager tag . Thank You
 *  Thread Starter [leblanc1](https://wordpress.org/support/users/leblanc1/)
 * (@leblanc1)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/tag-manager-google/#post-5794175)
 * One question d_4: with the function before_header Add code snippet manager labels
   Google is placed me after the opening tag <body > ?
 *  [Rocco Aliberti](https://wordpress.org/support/users/d4z_c0nf/)
 * (@d4z_c0nf)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/tag-manager-google/#post-5794176)
 * Yes, look here: [https://themes.trac.wordpress.org/browser/customizr/3.2.17/header.php#L26](https://themes.trac.wordpress.org/browser/customizr/3.2.17/header.php#L26)
   
   the action `__before_header` is fired just after the opening <body> tag. So with`
   add_action('__before_header', .. , 0);` we print that code there. Hope this helps
   😉
 *  Thread Starter [leblanc1](https://wordpress.org/support/users/leblanc1/)
 * (@leblanc1)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/tag-manager-google/#post-5794181)
 * Thanks for your help , it works .Saludos d4z
 *  [Rocco Aliberti](https://wordpress.org/support/users/d4z_c0nf/)
 * (@d4z_c0nf)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/tag-manager-google/#post-5794184)
 * Glad you solved 🙂
    Now you might want to set as resolved the other two topics
   you opened for this issue 😛 Te deseo una buena tarde! 😉
 *  Thread Starter [leblanc1](https://wordpress.org/support/users/leblanc1/)
 * (@leblanc1)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/tag-manager-google/#post-5794307)
 * thanks, I have marked as resolved. you have good weekend
 *  [Rocco Aliberti](https://wordpress.org/support/users/d4z_c0nf/)
 * (@d4z_c0nf)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/tag-manager-google/#post-5794308)
 * Yeah you marked this one :D, but I meant these other ones on the same subject:
   
   [https://wordpress.org/support/topic/add-tag-to-functionsphp-file-manager?replies=1](https://wordpress.org/support/topic/add-tag-to-functionsphp-file-manager?replies=1)
   [https://wordpress.org/support/topic/tag-manager?replies=1](https://wordpress.org/support/topic/tag-manager?replies=1)
 * 😉
 * thanks 😀
 *  Thread Starter [leblanc1](https://wordpress.org/support/users/leblanc1/)
 * (@leblanc1)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/tag-manager-google/#post-5794309)
 * ok , I’ve already marked as resolved right now.I think we are already pending
   Is there Any more ?. you ‘re online taking advantage I can ask a question about
   code?
 *  [Rocco Aliberti](https://wordpress.org/support/users/d4z_c0nf/)
 * (@d4z_c0nf)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/tag-manager-google/#post-5794311)
 * Yes this:
    [https://wordpress.org/support/topic/tag-manager?replies=1](https://wordpress.org/support/topic/tag-manager?replies=1)
 * About the other question, if is a total different topic you might want to open
   a new topic, otherwise go ahead here 😉 hopefully I can help you..
 *  Thread Starter [leblanc1](https://wordpress.org/support/users/leblanc1/)
 * (@leblanc1)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/tag-manager-google/#post-5794314)
 * Thanks d4z, you’re very kind. It’s on the same subject , is it possible in the
   same code also add DataLayer function ?
    < script> DataLayer = [ ] < / script
   > How can add the function to the code?
 *  [Rocco Aliberti](https://wordpress.org/support/users/d4z_c0nf/)
 * (@d4z_c0nf)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/tag-manager-google/#post-5794315)
 * reading this: [https://developers.google.com/tag-manager/devguide](https://developers.google.com/tag-manager/devguide)
   
   I see you should put it before the tag manager, right? So, complete the code 
   above to make it appear something like:
 *     ```
       add_action('__before_header','my_google_tag_manager', 0);
   
       function my_google_tag_manager() {
       ?>
           YOUR GOOGLE DATA LAYER CODE HERE
           (looks like <script type="text/javascript">.....</script> )
   
           YOUR GOOGLE TAG MANAGER CODE HERE
           (looks like <script type="text/javascript">.....</script> )
   
       <?php
       }
       ```
   
 * Then, also in that link you can see it’s `dataLayer` and not `DataLayer`, but
   oh well maybe it was just an example to let me understand 😀
 * Hopet this helps.
 *  Thread Starter [leblanc1](https://wordpress.org/support/users/leblanc1/)
 * (@leblanc1)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/tag-manager-google/#post-5794316)
 * thanks d4

Viewing 15 replies - 1 through 15 (of 35 total)

1 [2](https://wordpress.org/support/topic/tag-manager-google/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/tag-manager-google/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/tag-manager-google/page/2/?output_format=md)

The topic ‘tag manager google’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/customizr/4.4.24/screenshot.png)
 * Customizr
 * [Support Threads](https://wordpress.org/support/theme/customizr/)
 * [Active Topics](https://wordpress.org/support/theme/customizr/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/customizr/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/customizr/reviews/)

## Tags

 * [Tag Manager](https://wordpress.org/support/topic-tag/tag-manager/)

 * 35 replies
 * 2 participants
 * Last reply from: [leblanc1](https://wordpress.org/support/users/leblanc1/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/tag-manager-google/page/3/#post-5794386)
 * Status: resolved