I have installed a basic google analytics plugin and for the most part it works. It tracks all the pages and even taxonomies but not the custom post type. So, once you drill down on the actual website to:
In google analytics it only goes as far as:
/
leaving off the item.
When I view the source of the custom post type product item page, I can see that the tracking code is there.
Does anyone know why this might be happening?
Post type:
register_post_type('product', array(
'supports' => array('title', 'editor', 'thumbnail', 'excerpt'),
'rewrite' => array('slug' => 'product'),
'has_archive' => true,
'public' => true,
'labels' => array(
'name' => 'Products',
'add_new_item' => 'Add New Product',
'edit_item' => 'Edit Product',
'all_items' => 'All Products',
),
'menu_icon' => 'dashicons-cart'
));
Plugin used:
/