Skip to main content
All CollectionsIntegrationsShopify
How to Find the RFM Info in Shopify Frontend
How to Find the RFM Info in Shopify Frontend
Costin Floricel avatar
Written by Costin Floricel
Updated over a year ago

The RFM-related information can be synced back into Shopify, for each customer.

This is a feature available for Reveal Scale plan and can be activated by following a series of steps present in this tutorial .

How to expose RFM information within your Shopify store frontend

The code is automatically added for you, by the Shopify Reveal App, after our technical team processes your request for activating this feature.

However, if you need to change or debug something, here’s where you can find it:

Step 1:
Go to Online Store > Themes

Step 2:
Edit the code of your current theme

Step 3:
Go to Snippets > snippets/omniconvert_reveal-rfm-customer.liquid

Step 4:
The code which is automatically populated is listed below:

<script id="omniconvert_reveal_rfm_customer">
{% if customer %}
{% unless customer.metafields.omniconvert_reveal.data == blank %}
window._Reveal = {};
{% for key_value in customer.metafields.omniconvert_reveal.data %}
window._Reveal['{{ key_value[0] }}'] = decodeURIComponent('{{ key_value[1]|url_encode|replace: '+', ' ' }}');
{% endfor %}
{% else %}
window._Reveal = '_not_synced';
{% endunless %}
{% else %}
window._Reveal = '_not_logged_in';
{% endif %}
</script>

Step 5:
Go to Sections > sections/header.liquid and you should find the following code somewhere in this file (probably at the beginning):

{% render "omniconvert_reveal-rfm-customer.liquid" %}

Step 6:
In case you don’t have sections/header.liquid, you need to find another file to insert the snippet into.
The file you choose must be rendered on all pages, same way the sections/header.liquid normally is.
Also please contact us, as the automated sync process will fail if the application doesn’t find the sections/header.liquid file.

Step 7:
To check if the setup is correct, you need to log in your storefront as a customer, one that has been synced. Then open the browser console, and type: window._Reveal.
The object should look something like this:

Need to perform A/B testing?

Using Omniconvert Explore is the easiest way to perform an integrated A/B testing by leveraging customer segmentation from Reveal.

You can find out how to integrate the Omniconvert Explore code from the articles below:

Useful links

For more information on how meta fields are used, check out this article on Shopify: https://help.shopify.com/en/themes/liquid/objects/metafield

Did this answer your question?