How do I integrate adobe analytics using javascript?

Avatar

Avatar
Boost 1
Level 2
selvasajin
Level 2

Likes

2 likes

Total Posts

11 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 2
selvasajin
Level 2

Likes

2 likes

Total Posts

11 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile
selvasajin
Level 2

06-12-2017

I am new to adobe analytics, trying to integrate adobe analytics on my angular1.6 web app using javascript from past 3 days. I had followed the steps from adobe analytics implementation documentation using javascript Implementing Analytics Using JavaScript

Added adobe marketing cloud debugger on chrome and I am able to see the requests, but couldn't able to see anything on my AEM dashboard (page views, visits, ect). I am running the application form localhost. Can anyone help me to resolve this?

Replies

Avatar

Avatar
Boost 1
Level 2
selvasajin
Level 2

Likes

2 likes

Total Posts

11 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 2
selvasajin
Level 2

Likes

2 likes

Total Posts

11 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile
selvasajin
Level 2

07-12-2017

@btripple  I think these events [ s.t(); ] are fired since I have this line [ var s_code=s.t();if(s_code)document.write(s_code) ] in my code. I had added adobe debugger for chrome which will show the request (image attached). There is something in my browser console as well (image attached).

adobe debugger.png

console.png

Avatar

Avatar
Boost 1
Level 2
selvasajin
Level 2

Likes

2 likes

Total Posts

11 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 2
selvasajin
Level 2

Likes

2 likes

Total Posts

11 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile
selvasajin
Level 2

07-12-2017

julienp80647070​ I have checked the configuration, and there is no exclusion of IP.  Still not able to see the reports on my omniture dashboard.  Do I need to mention/add the host(localhost) somewhere in the omniture dashboard?

My tracking server is j********n.sc.omtrdc.net  and I am hitting from localhost is that a problem??

Avatar

Avatar
Boost 1
Level 2
selvasajin
Level 2

Likes

2 likes

Total Posts

11 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 2
selvasajin
Level 2

Likes

2 likes

Total Posts

11 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile
selvasajin
Level 2

08-12-2017

Hello Adobe community,

Can someone help me to resolve this, implementing adobe analytics using javascript?

Does it requires any further configuration on my omniture dashboard to view reports? Also do we need to add any DTM or web property or any tool/rule on the omniture dashboard if we are using javascript implementation??

Avatar

Avatar
Give Back 50
Level 6
pabloc82923542
Level 6

Likes

78 likes

Total Posts

358 posts

Correct reply

82 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile

Avatar
Give Back 50
Level 6
pabloc82923542
Level 6

Likes

78 likes

Total Posts

358 posts

Correct reply

82 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile
pabloc82923542
Level 6

08-12-2017

What reports in Adobe  Analytics are you trying to view?

If you capture a list of variables, then if they are standard they will appear in the various menus and sub menus(Traffic Reports > Pages > Pages, is for Pagename as an example). If they are custom you may need to have some of the menu setting adjusted to allow you to view them.

Implementing Analytics Using JavaScript

Go over this get a idea on how to implement the basics. I think you also may have to look at what is called your data layer.

Data Layer

The work I with angular I was involved with we used the angular frame work to inject our header and footer when need as well as used direct call rules. This was very efficient and saved alot of the headaches you seem to be having.

Good luck

Avatar

Avatar
Contributor
Level 2
btripple
Level 2

Likes

11 likes

Total Posts

18 posts

Correct reply

3 solutions
Top badges earned
Contributor
Shape 1
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Contributor
Level 2
btripple
Level 2

Likes

11 likes

Total Posts

18 posts

Correct reply

3 solutions
Top badges earned
Contributor
Shape 1
Give Back 5
Give Back 3
Give Back
View profile
btripple
Level 2

08-12-2017

@selvasajin

Based on your screenshot, I'd say your code is working fine, you might have the wrong report suite configured, you should confirm you have that correctly set.

Avatar

Avatar
Boost 1
Level 2
selvasajin
Level 2

Likes

2 likes

Total Posts

11 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 2
selvasajin
Level 2

Likes

2 likes

Total Posts

11 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile
selvasajin
Level 2

09-12-2017

btripple thankyou. Even I have the same doubt, there is a report suite for the mobile app on the omniture dashboard which has been created by the client. Do I need to create one for the website? or can I use the same.

Avatar

Avatar
Contributor
Level 2
btripple
Level 2

Likes

11 likes

Total Posts

18 posts

Correct reply

3 solutions
Top badges earned
Contributor
Shape 1
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Contributor
Level 2
btripple
Level 2

Likes

11 likes

Total Posts

18 posts

Correct reply

3 solutions
Top badges earned
Contributor
Shape 1
Give Back 5
Give Back 3
Give Back
View profile
btripple
Level 2

09-12-2017

selvasajin​  - I don't think that matters but some choose to separate web from app.  I would ask them to verify they provided the right report suite ID.  Ask for a screenshot of the ID within the interface, better yet gain admin access to confirm yourself.

Avatar

Avatar
Coach
Employee
Gigazelle
Employee

Likes

473 likes

Total Posts

1,947 posts

Correct reply

740 solutions
Top badges earned
Coach
Contributor 2
Validate 1
Ignite 80
Ignite 70
View profile

Avatar
Coach
Employee
Gigazelle
Employee

Likes

473 likes

Total Posts

1,947 posts

Correct reply

740 solutions
Top badges earned
Coach
Contributor 2
Validate 1
Ignite 80
Ignite 70
View profile
Gigazelle
Employee

13-12-2017

Report suite ID's are in essence data silos - you're not going to see any data if the selected report suite in Adobe Analytics doesn't match the RSID in an image request.

If you've 100% verified the image request RSID matches the report suite you're trying to pull data from, open a new workspace project and bring the 'page' dimension. You should see at least 1 line item, with the value 's.landingPage'. This means the implementation is working.

The fact that you have some variable names when they should be variable values is an indicator that you've wrapped variables in quotes in your JS. You'll want to make sure the image requests are sending the variable values, not the variable names themselves.

Avatar

Avatar
Boost 1
Level 2
selvasajin
Level 2

Likes

2 likes

Total Posts

11 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 2
selvasajin
Level 2

Likes

2 likes

Total Posts

11 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile
selvasajin
Level 2

13-12-2017

Thanks Gigazelle​ for the update,

Actually I had tried these variables/variableValues in my sample page code as a part of development, still no reports on the omniture dashboard:

//for s.server

s.server=window.location.hostname

s.server=window.location.host

s.server="company.sc.omtrdc.net"

//for s.pageName

s.pageName=“s.landingPage”

s.pageName=document.title

The s.events and s.channel remains same as strings

s.channel="Discover"

s.events="event1"

Here are the options that I had tried

<script language="JavaScript" type="text/javascript">

    /* You may give each page an identifying name, server, and channel on

    the next lines. */

    s.pageName="s.landingPage"

    /*s.pageName=document.title*/

    s.server=window.location.hostname

    /*s.server=window.location.host*/

    /*s.server="company.sc.omtrdc.net"*/

    s.channel="Discover"

    s.pageType=""

    s.prop1=""

    s.prop2=""

    s.prop3=""

    s.prop4=""

    s.prop5=""

    /* Conversion Variables */

    s.campaign=""

    s.state=""

    s.zip=""

    s.events="event1"

    s.products=""

    s.purchaseID=""

    s.eVar1=""

    s.eVar2=""

    s.eVar3=""

    s.eVar4=""

    s.eVar5=""

    var s_code=s.t();if(s_code)document.write(s_code)

</script>

Avatar

Avatar
Coach
Employee
Gigazelle
Employee

Likes

473 likes

Total Posts

1,947 posts

Correct reply

740 solutions
Top badges earned
Coach
Contributor 2
Validate 1
Ignite 80
Ignite 70
View profile

Avatar
Coach
Employee
Gigazelle
Employee

Likes

473 likes

Total Posts

1,947 posts

Correct reply

740 solutions
Top badges earned
Coach
Contributor 2
Validate 1
Ignite 80
Ignite 70
View profile
Gigazelle
Employee

14-12-2017

Out of curiosity, why not use DTM? It is so much easier to implement Analytics, and legacy implementations are becoming increasingly obsolete.

Also, based on what I'm seeing, I don't see anything else that would impact data collection. In order to troubleshoot the issue any further, we will want a public URL that we can access to figure out exactly what's wrong.