Advertisement
verygoodplugins

Untitled

May 24th, 2021
936
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.45 KB | None | 0 0
  1. function javascript_tagging() {
  2.  
  3.     global $post;
  4.  
  5.     $settings = get_post_meta( $post->ID, 'wpf-settings', true );
  6.  
  7.     if ( ! empty( $settings ) && ! empty( $settings['apply_tags'] ) ) {
  8.         echo "<script>mt('send', 'pageview', {email: 'my@example.com', firstname: 'John', company: 'Mautic', companyemail: 'mautic@example.com', tags: '" . implode( ',', $settings['apply_tags'] ) . "'});</script>";
  9.     }
  10.  
  11. }
  12.  
  13. add_action( 'wp_footer', 'javascript_tagging' );
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement