XF 2.1 How can I add a code on header on only one page?

If you mean /register/complete

Code:
<xf:if is="$template == 'template-register_complete'">

     your code here

</xf:if>

If you mean /account-confirmation/ - after the user clicked the link in the email

Code:
<xf:if is="$template == 'template-register_confirm'">

     your code here

</xf:if>

This will go inside the PAGE_CONTAINER template.
 
If you mean /register/complete

Code:
<xf:if is="$template == 'template-register_complete'">

     your code here

</xf:if>

If you mean /account-confirmation/ - after the user clicked the link in the email

Code:
<xf:if is="$template == 'template-register_confirm'">

     your code here

</xf:if>

This will go inside the PAGE_CONTAINER template.
Thanks. I think that will work. By the way, I was browsing the templates and in the template register_connected_account I found this:
<xf:head option="robots"><meta name="robots" content="noindex" /></xf:head>

That seems it is possible add code only for that template, right? If yes, how I must insert the following code on the template register_confirm ?

<!-- Event snippet for Website traffic conversion page -->
<script> gtag('event', 'conversion', {'send_to': 'AW-398475384/4Bf8u78ENrOite8hutdID'}); </script>
 
Top Bottom