Identifying customer load tests or internal events

There are many cases where you must test traffic that might affect analytics or datasets or do not want to track events from users.

You can identify such events in the following ways:

  • Register specific IP addresses with Sitecore Discover so that these addresses are tagged as internal or load test events. Contact support if this is the case.
  • Including rfk_flags when you send event traffic.
Note

You must ensure that these flags are only sent upon identification of internal or load test traffic. Accidentally flagging real events results in data loss.

Flag specification

You can use different mechanisms to send flags. When you use multiple methods to send flags, there is precedence based on the mechanism.

The following table lists mechanisms for sending flags in the order they apply.

PriorityMechanismKeyDescriptionExample
1URL query parameterrfk_flagsSpecify rfk_flags as a query parameter when reporting the eventGET {EVENT_URL}?data={<event_object>}&rfk_flags=cust_loadtest
2Event bodyrfk_flagsSpecify rfk_flags as part of the eventExample event object:

JSON<br>{<br> "type": "order",<br> "name": "confirm",<br> "rfk_flags": "cust_internal",<br> "value": { ... }<br>}<br>
3HTTP headerx-rfk-flagsSpecify x-rfk-flags in the headerCURL example:

Shell<br>curl '{EVENT URL}' \<br> -X POST \<br> -H 'x-rfk-flags: cust_internal' \<br> -H 'content-type: application/json' <br>  -H 'cache-control: no-cache'  \<br>  -H 'accept: application/json'  \<br>  -H 'authorization: {AUTH_KEY}' <br>  -d<br>'{"data":{"type":"view","name":"pdp","value":{}}}'<br>--compressed<br>
4Cookie__rfk_flagsSpecify __rfk_flags in a cookieCURL example:

Shell<br>curl '{EVENT URL}'  \<br>  -X POST  \<br>  --cookie "__rfk_flags=cust_internal"  \<br>  -H 'content-type: application/json' <br>  -H 'cache-control: no-cache'  \<br>  -H 'accept: application/json'  \<br>  -H 'authorization: {AUTH_KEY}' <br>  -d<br>'{"data":{"type":"view","name":"pdp","value":{}}}'<br>--compressed<br>

The following are supported customer flag values:

FlagFlag valueDescription
Customer internal"cust_internal"Tells Discover that the traffic is from internal users. Discover analytics ignores these events.NoteThese events still count towards your usage of the service.
Customer load test"cust_loadtest"Tells Discover that the traffic is from load testing. Discover analytics ignores these events.NoteThese events still count towards your usage of the service.
If you have suggestions for improving this article, let us know!