<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Path Analysis in Splunk in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Path-Analysis-in-Splunk/m-p/129514#M35241</link>
    <description>&lt;P&gt;I try the following.&lt;/P&gt;

&lt;P&gt;sourcetype="iis-2" | extract auto=true | search | transaction cs_username maxspan=30m&lt;BR /&gt;
| eval n = mvfind(cs_uri_stem, "/SearchResults.*") &lt;BR /&gt;
| eval m = n - 4 &lt;BR /&gt;
| eval prevpage4 = mvindex(cs_uri_stem, m) &lt;BR /&gt;
| table cs_uri_stem prevpage4&lt;BR /&gt;
| eval cs_uri_stem=urldecode(cs_uri_stem)&lt;/P&gt;

&lt;P&gt;The data looks a bit odd. I would expect to have /SearchResults/ in the cs_uri_stem field however this is populated with all different types of page.&lt;/P&gt;

&lt;P&gt;It would be good to see the number of hits on the Search results page the a list of all previous 4 pages combinations and hits against them?&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 15:13:01 GMT</pubDate>
    <dc:creator>DanielFordWA</dc:creator>
    <dc:date>2020-09-28T15:13:01Z</dc:date>
    <item>
      <title>Path Analysis in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Path-Analysis-in-Splunk/m-p/129508#M35235</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I use iis server logs and in each hit I have the flowing parameters.&lt;/P&gt;

&lt;P&gt;cs_uri_stem= Page user is on&lt;BR /&gt;
cs_Referer=Previous page&lt;/P&gt;

&lt;P&gt;What I would want to do is track back or forward by 3 or 4 steps.&lt;/P&gt;

&lt;P&gt;Every users is identified by the cs_username field.&lt;/P&gt;

&lt;P&gt;The question I want to answer is as follows....&lt;/P&gt;

&lt;P&gt;For all users that looked at a product page "&lt;EM&gt;/Product/&lt;/EM&gt;/Product*/", what were the previous 4 pages looked at before arriving at the product page?&lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:12:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Path-Analysis-in-Splunk/m-p/129508#M35235</guid>
      <dc:creator>DanielFordWA</dc:creator>
      <dc:date>2020-09-28T15:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Path Analysis in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Path-Analysis-in-Splunk/m-p/129509#M35236</link>
      <description>&lt;P&gt;You should be getting a GUID in IIS as well for the session. Use that to create a transaction. That will allow you to see each users entire session, then you can capture the pervious 4 pages viewed from there.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2013 19:16:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Path-Analysis-in-Splunk/m-p/129509#M35236</guid>
      <dc:creator>ShaneNewman</dc:creator>
      <dc:date>2013-11-05T19:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: Path Analysis in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Path-Analysis-in-Splunk/m-p/129510#M35237</link>
      <description>&lt;P&gt;If you have something like @ShaneNewman suggests, i.e. some form of session identifier, you can get to the value you want like so;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...| transaction sessionID 
| eval n = mvfind(cs_uri_stem, "Product/ProductX") 
| eval m = n - 4 
| eval prevpage4 = mvindex(cs_uri_stem, m) 
| table cs_uri_stem prevpage4
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The &lt;CODE&gt;transaction&lt;/CODE&gt; makes &lt;CODE&gt;cs_uri_stem&lt;/CODE&gt; a multivalued field which you can search through with &lt;CODE&gt;mvfind&lt;/CODE&gt; and &lt;CODE&gt;mvindex&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/CommonEvalFunctions"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/CommonEvalFunctions&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Hope this helps,&lt;/P&gt;

&lt;P&gt;/K&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2013 20:24:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Path-Analysis-in-Splunk/m-p/129510#M35237</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-11-05T20:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: Path Analysis in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Path-Analysis-in-Splunk/m-p/129511#M35238</link>
      <description>&lt;P&gt;Hi, Currently I have no session ID, I break the data down by user by day.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2013 09:34:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Path-Analysis-in-Splunk/m-p/129511#M35238</guid>
      <dc:creator>DanielFordWA</dc:creator>
      <dc:date>2013-11-06T09:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: Path Analysis in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Path-Analysis-in-Splunk/m-p/129512#M35239</link>
      <description>&lt;P&gt;Hi, I am trying your solution, thanks for the response. &lt;/P&gt;

&lt;P&gt;I use the cs_username field instead of session ID and look at the data over a 1 day range.&lt;/P&gt;

&lt;P&gt;I get the below error.&lt;/P&gt;

&lt;P&gt;Error in 'eval' command: Regex: nothing to repeat&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2013 09:36:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Path-Analysis-in-Splunk/m-p/129512#M35239</guid>
      <dc:creator>DanielFordWA</dc:creator>
      <dc:date>2013-11-06T09:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: Path Analysis in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Path-Analysis-in-Splunk/m-p/129513#M35240</link>
      <description>&lt;P&gt;Sorry the error was due to my poor regex, thanks for the answer, works great.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2013 09:40:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Path-Analysis-in-Splunk/m-p/129513#M35240</guid>
      <dc:creator>DanielFordWA</dc:creator>
      <dc:date>2013-11-06T09:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Path Analysis in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Path-Analysis-in-Splunk/m-p/129514#M35241</link>
      <description>&lt;P&gt;I try the following.&lt;/P&gt;

&lt;P&gt;sourcetype="iis-2" | extract auto=true | search | transaction cs_username maxspan=30m&lt;BR /&gt;
| eval n = mvfind(cs_uri_stem, "/SearchResults.*") &lt;BR /&gt;
| eval m = n - 4 &lt;BR /&gt;
| eval prevpage4 = mvindex(cs_uri_stem, m) &lt;BR /&gt;
| table cs_uri_stem prevpage4&lt;BR /&gt;
| eval cs_uri_stem=urldecode(cs_uri_stem)&lt;/P&gt;

&lt;P&gt;The data looks a bit odd. I would expect to have /SearchResults/ in the cs_uri_stem field however this is populated with all different types of page.&lt;/P&gt;

&lt;P&gt;It would be good to see the number of hits on the Search results page the a list of all previous 4 pages combinations and hits against them?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:13:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Path-Analysis-in-Splunk/m-p/129514#M35241</guid>
      <dc:creator>DanielFordWA</dc:creator>
      <dc:date>2020-09-28T15:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: Path Analysis in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Path-Analysis-in-Splunk/m-p/129515#M35242</link>
      <description>&lt;P&gt;I don't think you should wildcard the string in &lt;CODE&gt;mvfind()&lt;/CODE&gt; - just make it &lt;CODE&gt;mvfind(cs_uri_stem, "/SearchResults")&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;Also, you might need to check whether &lt;CODE&gt;m&lt;/CODE&gt; is a positive number.&lt;/P&gt;

&lt;P&gt;/K&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2013 12:48:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Path-Analysis-in-Splunk/m-p/129515#M35242</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-11-06T12:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: Path Analysis in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Path-Analysis-in-Splunk/m-p/129516#M35243</link>
      <description>&lt;P&gt;Thanks for the response. &lt;/P&gt;

&lt;P&gt;I have tried the below, however in the cs_uri_stem field there are all types of pages instead of just "/Search/SearchResults/"&lt;/P&gt;

&lt;P&gt;sourcetype="iis-2" | extract auto=true | search | transaction cs_username maxspan=30m&lt;BR /&gt;
| eval n = mvfind(cs_uri_stem, "/Search/SearchResults/")&lt;BR /&gt;
| eval m = n + 1 &lt;BR /&gt;
| eval nextpage1 = mvindex(cs_uri_stem, m) &lt;BR /&gt;
| stats count by cs_uri_stem nextpage1&lt;BR /&gt;
| eval cs_uri_stem=urldecode(cs_uri_stem) | eval nextpage1=urldecode(nextpage1)&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:13:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Path-Analysis-in-Splunk/m-p/129516#M35243</guid>
      <dc:creator>DanielFordWA</dc:creator>
      <dc:date>2020-09-28T15:13:07Z</dc:date>
    </item>
    <item>
      <title>Re: Path Analysis in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Path-Analysis-in-Splunk/m-p/129517#M35244</link>
      <description>&lt;P&gt;Also the pages are not in the correct order. The page values in nextpage1 have been seen by the user but not before or after the /Search/Results/&lt;/P&gt;

&lt;P&gt;I remove the eval m = n - 4 and added&lt;/P&gt;

&lt;P&gt;| eval nextpage1 = mvindex(cs_uri_stem, 1) &lt;BR /&gt;
| eval nextpage2 = mvindex(cs_uri_stem, 2) &lt;BR /&gt;
| eval nextpage3 = mvindex(cs_uri_stem, 3) &lt;BR /&gt;
| stats count by cs_uri_stem nextpage1 nextpage2 nextpage3 cs_username&lt;/P&gt;

&lt;P&gt;This shows pages the user has seen but not in any correct order, I checked against some users by looking at the date time stamp of all the users hits in the logs.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:13:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Path-Analysis-in-Splunk/m-p/129517#M35244</guid>
      <dc:creator>DanielFordWA</dc:creator>
      <dc:date>2020-09-28T15:13:13Z</dc:date>
    </item>
    <item>
      <title>Re: Path Analysis in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Path-Analysis-in-Splunk/m-p/129518#M35245</link>
      <description>&lt;P&gt;I think I have worked out the issue. If I look at an individual users activity for a day and filter descending on URL value I come to same results as from our query above. &lt;/P&gt;

&lt;P&gt;It seems that the mvindex is ordering results on URL value (A-Z) and not time of the hit by user.  &lt;/P&gt;

&lt;P&gt;For an individuals activity I see the order (A-Z URL value)&lt;/P&gt;

&lt;P&gt;/SearchResults/&lt;BR /&gt;
/Toolbox/Dev Tools&lt;BR /&gt;
/Toolbox/Dev Tools&lt;BR /&gt;
/Toolbox/Product&lt;BR /&gt;
/Toolbox/Product&lt;BR /&gt;
/Toolbox/Service&lt;/P&gt;

&lt;P&gt;I see the next pages in the above query as &lt;BR /&gt;
nextpage1=/Toolbox/Dev Tools&lt;BR /&gt;
nextpage2=/Toolbox/Product&lt;BR /&gt;
nextpage3=/Toolbox/Service&lt;/P&gt;

&lt;P&gt;How can I fix this?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2013 14:40:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Path-Analysis-in-Splunk/m-p/129518#M35245</guid>
      <dc:creator>DanielFordWA</dc:creator>
      <dc:date>2013-11-06T14:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Path Analysis in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Path-Analysis-in-Splunk/m-p/129519#M35246</link>
      <description>&lt;P&gt;oops. sorry for giving you bad advice. &lt;/P&gt;

&lt;P&gt;one possible workaround could be to concatenate &lt;CODE&gt;_time&lt;/CODE&gt; with &lt;CODE&gt;cs_uri_stem&lt;/CODE&gt; before the &lt;CODE&gt;transaction&lt;/CODE&gt;;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval my_cs_uri_stem = _time . " " . cs_uri_stem
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;then split them later... sounds ugly - but it may work.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2013 16:22:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Path-Analysis-in-Splunk/m-p/129519#M35246</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-11-06T16:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: Path Analysis in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Path-Analysis-in-Splunk/m-p/129520#M35247</link>
      <description>&lt;P&gt;your advice was good! Just found the solution...&lt;/P&gt;

&lt;P&gt;adding mvlist=t sorted the issue.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://answers.splunk.com/answers/54955/ordering-of-fields-in-a-transaction-mvfind-bug"&gt;http://answers.splunk.com/answers/54955/ordering-of-fields-in-a-transaction-mvfind-bug&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2013 16:50:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Path-Analysis-in-Splunk/m-p/129520#M35247</guid>
      <dc:creator>DanielFordWA</dc:creator>
      <dc:date>2013-11-06T16:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: Path Analysis in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Path-Analysis-in-Splunk/m-p/129521#M35248</link>
      <description>&lt;P&gt;Good to hear it worked - you learn something new each day. Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2013 17:47:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Path-Analysis-in-Splunk/m-p/129521#M35248</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-11-06T17:47:18Z</dc:date>
    </item>
  </channel>
</rss>

