Details

      Description

      This story actually includes (see original description):

      1. DXP: Call AC traffic_sources endpoint for the URL to retrieve organic and paid traffic sources based on keywords search
      2. AC: Call SEMrush url_organic endpoint for the URL to retrieve 100 top performing keywords (by traffic) from US database with traffic amount > 0
      3. AC: Call SEMrush url_adwords endpoint for the URL to retrieve 100 top performing keywords (by traffic) from US database with traffic amount > 0
      4. AC: Add up all traffic from each keyword > this number will be the "Total traffic" counting in the traffic sources chart. The percentage of each traffic source will be also provided.
      5. DXP: Receive AC response and inject data into UI display context
      6. DXP: Content performance panel shows results

      Future improvements:

      1. AC: Use SEMrush databases that match with the most visited regions of each URL in AC: https://issues.liferay.com/browse/LPS-111042
      2. AC: Configure AC cache: https://issues.liferay.com/browse/LPS-111499
      3. AC: Change maximum lines of keywords returned by SEMrush: https://issues.liferay.com/browse/LPS-111498

      Acceptance Criteria

      • Given the content performance panel,
      • When there's an internal error retrieving data,
      • Then the user is informed about this error.
      • Given the content performance panel,
      • When there's no traffic for both organic and paid searches,
      • Then the traffic source panel indicates 0 per traffic amount and traffic share for both searches.
      • Given the content performance panel,
      • When there's traffic for both organic and paid searches,
      • Then the traffic sources indicate the traffic amount and traffic share of each search.

      Test Scenarios

      Test Scenarios

      AC ID Test Strategy Test Scenarios Is it covered by FrontEnd ? (JS-Unit) Is it covered by BackEnd? (unit or integration) Poshi?
      01 Sanity When there's an internal error retrieving data, the user is informed about this error YES  YES  
      02 Smoke When there's no traffic for both organic and paid searches, the traffic source panel indicates 0 per traffic amount and traffic share for both searches YES   YES  
      03 Smoke When there's traffic for both organic and paid searches, the traffic sources indicate the traffic amount and traffic share of each search YES   YES  

      Backend

      Analytics Cloud (RootRestControllerTest)

      1. When an error occurs calling SEMrush then the traffic sources endpoint returns an error
      2. When there's no data for both organic and paid keywords searches then the traffic sources endpoint returns a list of two elements, one for each type or search. Each element indicates for organic and paid searches 0 in traffic amount and 0 in traffic share
      3. When there's data for either paid or organic searches then the traffic sources endpoint returns a list of two elements, one for each type or search. Each element informs of the traffic amount and the traffic percentage of each search.

      Liferay Portal (AnalyticsReportsDataProviderTest)

      1. When an error occurs calling Analytics Cloud then the traffic sources provider throws an error
      2. When there's data for either paid or organic searches then the traffic sources provider returns a list of two elements, one for each type or search. Each element informs of the traffic amount and the traffic percentage of each search.

      Liferay Portal (AnalyticsReportsDisplayContextTest )

      1. When there's data for either paid or organic searches then the traffic sources display context property contains a list of two JSON objects, one for each type or search. Each element informs of the traffic amount and the traffic percentage of each search.

      Frontend

      Liferay Portal (TrafficSources.js)

       PASS test/js/components/TrafficSources.js
      ✓ displays the sources according to API (103ms)
      ✓ displays a dash instead of value when the value is missing (21ms)
      ✓ displays a message informing the user that there is no incoming traffic from search engines yet (18ms)

      I'm testing the component isolated with the same data structure that backend sends to the frontend.

      • Organic and Paid have a concrete value (e.g.: 12345)
      • One traffic source has an undefined value (the component displays a dash "-" instead of a value)
      • Organic and Paid have no incoming traffic yet (Organic 0 and Paid 0)

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Packages

                  Version Package
                  Master