Hi all,
Please can you advice if there is a solution for the below.
in a eVar, data is present as
eVar11
---------
x_PID:2
y_PID:3
z_PID:4
want
-------
2
3
4
Is this achievable
Solved! Go to Solution.
Views
Replies
Total Likes
There are two approaches you could use.
You could use a classification such as ^.*:(\d+). Classifications come in two flavors. The easiest is the Classification Rule Builder. There are several steps involved in setting up a classification with the Rule Builder. Here are the instructions of how to do that: https://experienceleague.adobe.com/docs/analytics/components/classifications/classifications-rulebui...
Alternatively, you could use a list var. This looks for a delimiter (: in this case) and splits the values in the evar based on the delimiter. So the evar would look something like:
This method is not backwards compatible and is perhaps overkill for what you want to do. Go to Analytics > Admin >Report Suites > Edit Settings > Conversion > List Variables. Here are the instructions: https://experienceleague.adobe.com/docs/analytics/admin/admin-tools/manage-report-suites/edit-report...
There are two approaches you could use.
You could use a classification such as ^.*:(\d+). Classifications come in two flavors. The easiest is the Classification Rule Builder. There are several steps involved in setting up a classification with the Rule Builder. Here are the instructions of how to do that: https://experienceleague.adobe.com/docs/analytics/components/classifications/classifications-rulebui...
Alternatively, you could use a list var. This looks for a delimiter (: in this case) and splits the values in the evar based on the delimiter. So the evar would look something like:
This method is not backwards compatible and is perhaps overkill for what you want to do. Go to Analytics > Admin >Report Suites > Edit Settings > Conversion > List Variables. Here are the instructions: https://experienceleague.adobe.com/docs/analytics/admin/admin-tools/manage-report-suites/edit-report...
@DennisUl1 I would recommend you to use a regex within your rule where you set this eVar to split and just return the numeric value right after the colon. Here is the sample code:
var inputString = "y_PID:3"; //in real work you need to read it from data layer
const regex = /:(\d+)/;
s.eVar11 = inputString.match(regex)[1];
Views
Replies
Total Likes