Trend Solutions

Updated 

Trend metrics provide the daily level performance of posts. Respective Channel APIs provide only lifetime value i.e. the total number of say impressions on a post. There are multiple instances when data from the API could fail for a singular day, in this article we will cover how we adjust trend metrics and the nuances around those.

Potential discrepancies that might show up

Sprinklr has observed sometimes that lifetime value of metrics like impressions, video views, etc reduce over a period of time. This results in negative values of impressions which is not possible.

Date 

Facebook Post Impressions 

Facebook Post Impressions Trend 

Comments 

1-Jan-19

100

100

 

2-Jan-19

500

400

 

3-Jan-19

1000

500

 

4-Jan-19

2000

1000

 

5-Jan-19

4000

2000

 

6-Jan-19

3900

-100

Lifetime value decreased by 100, hence resulting in negative trend values. 

In case, Sprinklr is unable to fetch data from respective APIs due to intermittent errors in API or inactive account, then the combined performance gets reflected on the date when Sprinklr makes a successful API call resulting in inflated numbers.

Date 

Facebook Post Impressions 

Facebook Post Impressions Trend 

Comments 

1-Jan-19

100

100

 

2-Jan-19

500

400

 

3-Jan-19

1000

500

 

4-Jan-19

2000

1000

 

5-Jan-19

-

0

Unable to fetch data from API or inactive account. The trend is set as 0.

6-Jan-19

6500

4500

Inflated numbers as a trend include a number of impressions received yesterday. 

Note: When a historical backfill request is raised, all the performance numbers for old posts get reflected on the date when backfill was run. This results in a huge spike in numbers.

How Trend Data is Generated for Missing Dates or Negative Values?

  • Negative Values

    Date 

    Facebook Post Impressions 

    Facebook Post Impressions Trend 

    Comments 

    1-Jan-19

    100

    100

     

    2-Jan-19

    500

    30

    These data points are generated using a curve-fitting algorithm. 

    3-Jan-19

    1000

    50

     

    4-Jan-19

    2000

    60

     

    5-Jan-19

    4000

    70

     

    6-Jan-19

    400

    90


  • Missing Dates: Whenever data is fetched from API, Sprinklr generates the missing trend records for a date between last trend date and current date. The same curve fitting algorithm is used to generate data for missing values. For example, if a post was published on 1-Jan-19 and our API call failed on 12-Jan-19 and 13-Jan-19, Sprinklr would create trend records for missed records using a curve fitting algorithm when the latest data is available on 14-Jan-19.

    Date 

    Lifetime Value 

    Trend Value 

    Comments 

    1-Jan-19

    13242

    13242

     

    2-Jan-19

    14483

    1241

     

    3-Jan-19

    17724

    2424

     

    4-Jan-19

    20148

    1000

     

    5-Jan-19

    21480

    1332

     

    6-Jan-19

    22456

    985

     

    7-Jan-19

    23029

    564

     

    8-Jan-19

    23484

    455

     

    9-Jan-19

    24174

    690

     

    10-Jan-19

    24488

    314

     

    11-Jan-19

    24730

    242

     

    12-Jan-19

    -

    0

    431 

    Unable to fetch data from API, hence trend record doesn’t exist. 

    13-Jan-19

    -

    0

    401

    Unable to fetch data from API, hence trend record doesn’t exist. 

    14-Jan-19

    25943

    1213

    381

    When Sprinklr fetched the latest value from API and saw that no trend data was available for previous days, generate values using trend data.