Data is not sent to Klaviyo.

  • 22 December 2021
  • 3 replies

  • Anonymous
  • 0 replies

Hi all,
I've used Klaviyo to send Email for a service in my WordPress website. I can’t find the problem since I receive no errors in response from Klaviyo. I found that if the user is registered in Klaviyo then the email will be sent, if not, no email will be sent.

You can find the complete source code Coo Coo! (

<script type="text/javascript">
            var _learnq = _learnq || [];

  '', {data: '{"token": "XXXXXX","properties": {"$email":""}}'}, function(result){
                console.log('Result', result);
            var item = {
                'poster_url':'' + 'Antwerp ',
                'poster_name':'Antwerp ',
                'ap_name':'Soha A.',
                'ap_street_and_number':'Address Line 1',
                'ap_country':'United Kingdom',
                'ap_room':'Living Room',
            _learnq.push(['track', 'PosterAuthentication', item])


Best answer by David To 23 December 2021, 20:14

View original

3 replies

Userlevel 7
Badge +60

Hello @soha.a,

Welcome to the Klaviyo Community! 

From the code you provided, it looks like you are making a POST request to record a custom event to Klaviyo. I think it would be really helpful if you provided more information and details pertaining to what it is you were trying to accomplish.

Troubleshooting custom codes can be hard as it pertains to a number of variables that can potentially be the cause of an issue. For this reason I would suggest reaching out to a developer you are familiar with who is knowledgable about Klaviyo’s API or to an accredited Klaviyo Partner who can further review your code and how things are set up. 

From my experience, a common reason why a custom event may not be triggered or registering within an account is that it is being rate limited. There’s been several posts pertaining to this topic which I’ve included below that may be of use:

I hope this helps!


Thanks David for your attention, I have a custom flow that when a user submit his/her information for the product they bought, I send an email to greeting the user with that data. I asked another developer, he told me that I have to register the user email in Klaviyo first and then send the second POST request. Since I didn’t find any documentation about how to register an email to Klaviyo with API I added identify POST request to my script with user entered email which is as example'', {data: '{"token": "XXXXXX","properties": {"$email":""}}'}, function(result){
                console.log('Result', result);

but nothing is received to Klaviyo or I can’t find it in Activity Feed.

I hope I could explain what was the problem.
Soha A.

Userlevel 7
Badge +60

Hey @soha.a,

Thanks for those additional details. Although it is possible to include an Identify call as part of your overall payload, its typically best practice to separate operations so to have different functions/scripts specific to each call. Your developer’s suggestions would be correct where two steps would be following best practices; one to register and identify the user and the second to POST the request for the identified user. 

If you haven’t already, I would suggest taking a look at some resources found within our API Documentation that discusses more on the matter of identifying users via API: