Maximum characters allowed for string type in Statistics Collector

I'm trying to collect a string variable and add to my analytics. This string variable can have up to 54 characters at times. Those string values of size up to 50 characters are visible in the reports. But those values of more length are stored as null. I'm on Edge Public cloud. What's the maximum characters allowed for a string type in Statistics Collector?

Any suggestions are welcomed.

0 4 558
4 REPLIES 4

hmmm, I don't know the answer to that, and I'm not sure it's documented.

But, I think you're seeing a maximum of 50 characters. Is that right?

Then, maybe that's the answer?

Are you looking for an "official confirmation"?

Hi @Dino-at-Google,

Thank you for the response!

I'm looking for advise from someone who had been in same situation. Is storing 'null' for strings with 50+ characters expected? Is there any way to trim the extra characters and store without going to JavaScript? Is there any way to increase the limit if it's 50 default setting?


Maximum characters allowed for string type in Statistics Collector policy is 50 by default on Edge Public Cloud.

If the reference string variable has a string with more than 50 characters, null will be logged into AX.

I have used the following JavaScript to trim out the extra characters and is working fine for me.

try{
    var stringVariable = context.getVariable("apigee.stringVariable");
    stringVariable = stringVariable.substring(0,49);
    context.stringVariable("apigee.stringVariable",stringVariable);
}
catch(err){
    context.setVariable("apigee.stringVariable",err.message.substring(0,49));
}
<StatisticsCollector async="false" continueOnError="false" enabled="true" name="StatsCollect">
    <DisplayName>StatsCollect</DisplayName>
    <Properties/>
    <Statistics>
       <Statistic name="stringvariable" ref="apigee.stringVariable" type="STRING">No data</Statistic>
    </Statistics>
</StatisticsCollector>

I tried this policy recently, and was able to log in 383 Characters into a custom dimension. Can someone confirm new character length?