I'm attempting to create a value for one of our brands to align with the others, but currently that value isn't coded on this site.
The image below is a processing rule with a single if else which seems to be all that you are allowed.
Is there a way to make a second if else option, so that I can further clarify information about the app or web visits... or would I need to make multiple processing rules in order to create 3+ values in this evar?
It seems to be the case, but wanted to make sure before I created a large amount of unnecessary rules.
Thanks!
Solved! Go to Solution.
Views
Replies
Total Likes
Processing Rules are pretty simple (as you can see).. there is no If...else if... else if... etc... else logic...
There is the "add condition" to each item, that can be used as an additional classification, but you can only have one check here (not multiple, like on the main rule)
That said, you can get creative by stitching together logic, using the rules and the conditions to "optimize" your rules (I put that in quotes, because it can be harder to create and follow, but it does keep the overall rules down... it's a "six of one, half a dozen of the other" situation).
I am not sure your final intended result, but here is a simple example:
I am not sure what values you want, so I will just use placeholder values.
Rule: X
Condition 1
Condition 2
Then:
Overwrite value of eVar1 with "value 1"
If eVar2 equals "something1"
Overwrite value of eVar1 with "value 2"
If eVar2 equals "something2"
Overwrite value of eVar1 with "value 3"
If eVar5 equals "anotherValue"
Overwrite value of eVar1 with "value 4"
If pageURL contains "foo"
Basically, the Rule conditions must be met for the rule to trigger (either ALL rules, or Any depending on your needs), then you can add one additional qualification to the individual item... you can do this in the "otherwise" section as well.
I rarely use the "Otherwise"... most of my rules are set up with Common Rule conditions, and then specific conditions on each item..
Processing Rules are pretty simple (as you can see).. there is no If...else if... else if... etc... else logic...
There is the "add condition" to each item, that can be used as an additional classification, but you can only have one check here (not multiple, like on the main rule)
That said, you can get creative by stitching together logic, using the rules and the conditions to "optimize" your rules (I put that in quotes, because it can be harder to create and follow, but it does keep the overall rules down... it's a "six of one, half a dozen of the other" situation).
I am not sure your final intended result, but here is a simple example:
I am not sure what values you want, so I will just use placeholder values.
Rule: X
Condition 1
Condition 2
Then:
Overwrite value of eVar1 with "value 1"
If eVar2 equals "something1"
Overwrite value of eVar1 with "value 2"
If eVar2 equals "something2"
Overwrite value of eVar1 with "value 3"
If eVar5 equals "anotherValue"
Overwrite value of eVar1 with "value 4"
If pageURL contains "foo"
Basically, the Rule conditions must be met for the rule to trigger (either ALL rules, or Any depending on your needs), then you can add one additional qualification to the individual item... you can do this in the "otherwise" section as well.
I rarely use the "Otherwise"... most of my rules are set up with Common Rule conditions, and then specific conditions on each item..
Ah yes. That appears like it would work.
But the field that I think I need to use to break it down is Mobile Device Type. That's not an evar or prop though. I'm assuming it's in a data layer object? But how do I determine what's populating that value?
Yes, unfortunately, Mobile Device Type is a processed field, and isn't available yet... that happens after these rules in the execution sequence.
I am not sure what else you have that you might be able to use... Processing Rules are good, and they can be used to fix some things, but there are times when you still don't have enough in your actual implementation to properly support what you need....
Very true. I was hoping to get this implemented more quickly. I'm keep looking. Thanks for the help.
You're welcome 🙂
I assume you are trying to basically get a split of "app", "mobile", "tablet", "desktop" or something like that...
Which could be hard without the proper fields... and I am also assuming you are going this route because you either aren't using a tag manager, or someone else is in charge of the tag manager and you are stuck waiting for a fix...
Either way, not ideal... hopefully you don't have to wait too long to get a proper solution, and good luck checking to see if there is something available that you can leverage to get the values you need (or at least close)
Views
Replies
Total Likes
Views
Likes
Replies