AMP email template - conflicts with Klaviyo tracking

  • 24 May 2021
  • 2 replies


I’m trying to setup an AMP email template, but when tracking is enabled on Klaviyo, it tends to over-write some of my AMP template code.

For example,

<div hidden [hidden]="rating < 9">

gets converted to

<div hidden rating < 9 >


This leads to ‘Invalid AMP error’ when I open the email in my gmail client because the markup is incorrectly constructed. 

This issue happens when either Email-to-Website tracking is enabled from Account Settings, or Tracking enabled when sending the Campaign. This seems to be caused because of Klaviyo’s engine allowing custom tracking events like below, which is in conflict with AMP variables.

<input type="hidden" name="event[FooBar]" value="Foo Bar">

 Adding  {% verbatim %} tags does not help to resolve this.

Is there a workaround to this?

2 replies

Userlevel 6
Badge +5

Hi @Anbu,

Thank you for sharing your question and exploring the Klaviyo Community for some solutions.

We appreciate you pointing this out, however, since AMP emails require using custom code, Klaviyo cannot help design or troubleshoot errors for these types of emails. For further assistance with remedying a potential conflict with tracking code, and other services to help your business, I recommend finding a Klaviyo partner

Additionally, it would be great to hear from other members of the Community who may have had similar experiences, and how they went about resolving.

Thank you and have a wonderful day.

Hey Dov,

We are building something for a bunch of our customers, and Klaviyo is an integral part of our integrations. Can you please help us out in anyway, apart from re-directing us to a Klaviyo partner because we have not come across a partner who specializes in AMP email development?


Thanks in advance!