Skip to content

Instantly share code, notes, and snippets.

@woogist
Created July 17, 2015 09:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save woogist/112abf14abb9154872ce to your computer and use it in GitHub Desktop.
Save woogist/112abf14abb9154872ce to your computer and use it in GitHub Desktop.
function custom_tracking_code() {
if ( is_product() ) {
?> Add your Product code here <?php
} elseif ( is_cart() ) {
?> Add your Cart code here <?php
} elseif ( is_order_received_page() ) {
?> Add your Thank you code here <?php
}
}
add_action( 'wp_head', 'custom_tracking_code' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment