Hi @RedPhive and welcome back to the Community!
First off, may I ask how you’re testing the custom metric? One important thing to note is that the metric will only be tracked for customers that have been previously cookied. So if you’re testing from a browser where you haven’t entered your email or been captured by your store in another way, the testing would fail. Likewise, if customers visit the site and haven’t been cookied, they won’t appear either.
That’s also what is being referred to in the Help Center - the point of appending the UTM parameter to the URL for testing is to simulate a previously cookied account, so that you can test from your own end. It’s not something that has to be considered for external visitors, since they will either be cookied previously or not - it’s just for testing.
If you use the UTM parameter to test and you’re still not seeing the metric in your Klaviyo account, then that probably means that the snippet was not properly added to your site. The correct location will vary depending on your site’s setup, so you may have to double check where you are able to paste custom Javascript into your site. Since this isn’t a standard feature of Klaviyo, if you need more in-depth help with development, you can always reach out to one of wonderful Klaviyo Agency Partners.
I did also find this external article on how to install custom JavaScript on a WordPress site:
https://themeisle.com/blog/wordpress-custom-javascript/
I hope this helps to clarify, and thanks for using the Community!
- Brian
Hey Brian,
Thanks for the response.
I tested with a email address that has been cookied and already tracking API calls through the website.
I can see the entire website activity “viewed product” & “add to cart” the nothing when the user visits the page with the code.
The script is implemented and located next to another similar script which is active and firing correctly.
So I was able to get it to work with the help of support by adding a bit of script to the same page.
<script type="text/javascript" async="" src="https://static.klaviyo.com/onsite/js/klaviyo.js?company_id=XXXXXXX"></script>
With my company ID where those Xs are.
Hi @RedPhive!
Glad you were able to get in touch with Support and get it working! This will be a valuable reference for other Community members.
Thanks for using the Community!
- Brian