In Site Analytics for multisite

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
2/9/2012 8:16:27 AM
Gravatar
Total Posts 87

In Site Analytics for multisite

Hi Joe,

i have multisite configuration with foldere based related sites.

installed the module and it works fine in main site. but on subsites it says access denied when i click on In Site Analytics icon in admin dashboard, what i'm missing?

Also can you point me where to set profile ID which to use for analytics, can i override the google key from site settings? the idea is that in sitesettings i have same profile id for all related sites, but in GA account i created filtered profiles and want to show filtered profile in analitics of each website in installation. How can i do this?

And one more note, not a question but observation - when i first tryed to install module i made error in configuration of db that will accept the data, so sqript runned with errors and have not created tables, but updated the schema version, so when i fixed the database for analistics and tryed to setup it again it would not runs setup scripts because of schemaversion was updated. so i had to manually delete new rows from schemaversion to force setup script to rerun and create tables. may be you can check and not update schemaversion if there where errors during this step.

Regards,

Victor

2/9/2012 9:39:14 AM
Gravatar
Total Posts 18439

Re: In Site Analytics for multisite

Hi Victor,

installed the module and it works fine in main site. but on subsites it says access denied when i click on In Site Analytics icon in admin dashboard, what i'm missing?

Are you logged in as admin in the child site? It works for me. I copied the /Data/Sites/1/supplementaladminlinks folder to the other sites under /Data/Sites/[SiteID/

You should be able to set the account id the same in Site Settings of each site under the API Keys tab you enter the main account id in the box labelled "Google Analytics Account Code" so that everything is tracked to your main account.

Then in In Site Analytics in the child sites if your are signed in as admin you should be able to go into Analytics Configuration in each child site and set the profile id you want to track as well as set roles allowed to access it.

When using a separate database for In Site Analytics you have to run the scripts manually on the second database because the setup page can only run scripts against the main database. So the setup page is going to install the tables and procs in the main db in any case but they won't be used if you set a different connection string for In Site analytics. So the schema version table is not really a factor, it affects only the things installed in the main db but has no knowledge of the other db used by In Site analytics. If it shows errors on the setup page installing into the main db you can just ignore them since you are using a separate db.

Hope that helps,

Joe

2/9/2012 10:41:55 AM
Gravatar
Total Posts 87

Re: In Site Analytics for multisite

Hi Joe,

1) i'm logged in as administrator (it is related sites) and i can access analytics icon in main site, i copied the config to second site and see the icon  but can not access it.

2) the main site shows me dropdown to choose profiles from my subssites. but i want to be able manually enter different profile. Let me explain in details:

it is folder based subsites, all of the set to youse same GA profile UA-XXXXX-1 - i want all subsites to report in one GA account -  so i can see full statistics for domain, not individual sites, but i created in GA subprofiles to show filtered statistics for each site(folder), so i have few profiles like UA-XXXXX-2, UA-XXXXX-3  and google filters there my stats. If i will select profiles from dropdown list it will be same   UA-XXXXX-1  because i've set it for all profiles. somewhere in documentation it was mentioned that you can trace GA even for external third party website - so there should be place somewhere to enter profile id manually but not using current portal api keys settings.

Regards,

Victor

2/9/2012 11:31:20 AM
Gravatar
Total Posts 18439

Re: In Site Analytics for multisite

Hi Victor,

When you mouse over the admin link in the child site does it show the folder name in the url?

Yes, you should use the same tracking code in all sites from site settings, and you should be able use different profile ids for reporting in In Site Analytics in each child site so you can see the filtered results for each site.

You may need to add these in user.config:

<add key="stsAnalytics:AllowReportsInChildSites" value="true" />
<add key="stsAnalytics:AllowQueryEditingInChildSites" value="true" />
<add key="stsAnalytics:AllowUsingDatabase" value="true" />
<add key="stsAnalytics:AllowUsingDatabaseInChildSites" value="true" />
<add key="stsAnalytics:Tracking1ProfileOnly" value="false" />

Hope that helps,

Joe

2/9/2012 12:40:29 PM
Gravatar
Total Posts 87

Re: In Site Analytics for multisite

Hi Joe,

yes when i hover the admin link i see link like this

http://www.mydomain.com/myfolder/Analytics/Default.aspx

Regards,

Victor

2/9/2012 12:51:46 PM
Gravatar
Total Posts 18439

Re: In Site Analytics for multisite

Did you add the settings I mentioned?

2/9/2012 1:35:24 PM
Gravatar
Total Posts 87

Re: In Site Analytics for multisite

Hi Joe,

thank you for your patience, i missed stsAnalytics:AllowReportsInChildSites , i misunderstood the documentation and thought that i would need it only if want to turn it off and it will work by default.

so my last question is about profile id - is there way to manually enter profile id instead of selecting in dropdown list? or may be directly in some db table? i want to use different profile id from what is written in API keys section of each site

Regards,

Victor

2/9/2012 3:51:18 PM
Gravatar
Total Posts 18439

Re: In Site Analytics for multisite

Hi Victor,

The dropdown list should show all the profiles for your account.

There are 2 settings stored in the mp_SiteSettingsEx table, GoogleAnalyticsProfileId and GoogleAnalyticsSettings

If you want to try setting them manually in the db I suggest first choose from the dropdown so you can see how it should be formatted.

Hope that helps,

Joe

2/9/2012 4:09:37 PM
Gravatar
Total Posts 87

Re: In Site Analytics for multisite

Hi Joe,

Thank you, this is what i needed and i finally understood the dropdown and profile id's used.

Regards,

Victor

2/10/2012 9:13:40 AM
Gravatar
Total Posts 87

Re: In Site Analytics for multisite

Hi Joe,

one more issue - when i visit my profile for some of subsites inside google acount - i only see filtered data fro this subsite, but when i go to Analytics/TodaysTraffic.aspx for some specific subsite i see similar statistics for filtered content and few extra rows showing urls to other subsites - they have all columns (page views, entrances etc) set to zero except "Visits" column, that contains some number. 

Am i missing one more option again?

Regards,

VIctor

2/14/2012 3:44:00 AM
Gravatar
Total Posts 87

Re: In Site Analytics for multisite

Hi Joe,

the problem still persist, now all subssites in Analytics/ContentAnalysis.aspx section do show some traffic facts for current subsite (seem to match what i see in GA profile when login directly to google). and about 10-15 records with 0 in Page Views column and those records belong to other subsites. Also it seem to be the same list of urls shown on all pages. Could it be some kind of cache (i've restarted the website it didn't help)? or may be you some version fo the library wit extensive logging so i can provide the logs to you? or may be you can find temporary solution to hide records with zero in column (anyway it is strange to show page that has 0 pageviews)?

Regards,

Victor

2/14/2012 10:49:38 AM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: In Site Analytics for multisite

Hi Victor, just to let you know, Joe is on a long overdue vacation this week, so he's not ignoring you here. In Site Analytics isn't open source, so unfortunately we other members of community support are not going to be able to help you out with these issues. But I'm sure Joe will get back to you on these as soon as he returns.

Jamie

2/20/2012 11:52:06 AM
Gravatar
Total Posts 18439

Re: In Site Analytics for multisite

Hi Victor,

The only thing I can think of is if some data got logged before all the configuration changes were made.

One thing you could try is to truncate the data for the pages report by:

EXEC sts_ga_PageData_Truncate

Then make it rebuild the data by clicking the button on the Data Manager Page

It is especially important that this setting is false:

<add key="stsAnalytics:Tracking1ProfileOnly" value="false" />

Hope that helps,

Joe

2/20/2012 1:06:10 PM
Gravatar
Total Posts 87

Re: In Site Analytics for multisite

hi Joe,

I've checked my config and is set to false. running the truncate sp did not help, i suspect i see the results from GA not from internal database. I started to see such strange entries before sync on datamaneger page. I there any trace/logging i can turn on to provide to you or may be you can send me debug version of the dll with verbose logging?

Regards,

Victor

2/21/2012 7:33:01 AM
Gravatar
Total Posts 18439

Re: In Site Analytics for multisite

Hi Victor,

I could send you debug builds of the dlls and .pdb files but I don't think it would do any good. The only logging I have setup is error logging.

I suggest lets diagnose the problem for a single report first, you tell me which one, then I'll tell you how the query is configured and you can try the same query using their Data Feed Query Explorer and see if you get different data or not.

Best,

Joe

2/21/2012 7:56:41 AM
Gravatar
Total Posts 18439

Re: In Site Analytics for multisite

Hi Victor,

The other thing I can look into is upgrading to the new v3 of google analytics api that just came out in December 2011. Unfortunately it is not backward compatible and will require major re-writing of code since they no longer support xml and only support json, so it may be a little while before I can complete that.

Best,

Joe

2/21/2012 8:11:41 AM
Gravatar
Total Posts 87

Re: In Site Analytics for multisite

Hi Joe,

thank you for the link, let's start form "todays traffic", i have one wrong entry right now, can you please advise what to enter in query editor?

Also one non related question - when i created the webserver it was under test domain name, now it is in production name and i made prefered domain name as production and left tes one, but  links inside of in-site analitics page shows my old test domain but not current - where can i switch that?(also it does not redirect to prefered host in this case, it is only for subsites, main site shows correct link to current host name)

Regards,

Victor

2/21/2012 8:25:02 AM
Gravatar
Total Posts 87

Re: In Site Analytics for multisite

Hi Joe,

i've just made request to my subsite for today traffic for ga:landingPagePath and ga:pageviews left all other fields blank and it does not show any unneeded entries.

what else to check?

Regards,

Victor

2/21/2012 8:42:08 AM
Gravatar
Total Posts 18439

Re: In Site Analytics for multisite

Hi Victor,

The Data Feed Query Explorer link I posted previously uses the newer api, so it may return different results.

Using the Query Editor include in In Site Analytics, I created a query with the same data as the top content for todays traffic and it shows the same data for my site as the report except for small differences due to timing. The report gets cached for 10 minutes I think whereas the query is live.

For Metrics I put: 

ga:pageviews,ga:visits,ga:newVisits,ga:entrances,ga:bounces

For Dimensions I put:

ga:pagePath

For Sort I put:

-ga:pageViews

For Date Mode set "Use Specific Dates"

For both dates put 02/21/2012

For Max Rows to get put 50

Best,

Joe

2/21/2012 8:50:36 AM
Gravatar
Total Posts 18439

Re: In Site Analytics for multisite

The name of the tracked site is stored at the time when you configured In Site Analytics, as mentioned before:

There are 2 settings stored in the mp_SiteSettingsEx table, GoogleAnalyticsProfileId and GoogleAnalyticsSettings

It should show the same as what google shows for the profile name in the dropdown list when you configured it.

Best,

Joe

2/21/2012 8:57:13 AM
Gravatar
Total Posts 87

Re: In Site Analytics for multisite

Hi Joe,

Interesting

when i use ga:landingPagePath - i see clean list of urls, but when i use ga:pagePath as you suggested - i see exactly tha same bad entires (may be not bad but unexpected) as on in-site analitics. Hope this will help, i do not know much about GA API and not sure what is the difference in the paths, may be the pagepath includes referer path or something like this? this may explain why it is present in API.

Regards,

Victor 

2/21/2012 9:49:50 AM
Gravatar
Total Posts 18439

Re: In Site Analytics for multisite

Hi Victor,

According to the documentation, ga:LandingPagePath  is "The first page in a user's session, or landing page."

So that is not useful for complete tracking of page view traffic, its more like entry point tracking.

Currently we are using v2.3 of the Google Analytics API. While v3 is completely incompatible and would take a major re-write to use it, it looks like v 2.4 is mostly backward compatible, so I should be able to update to that api without too much trouble. I'm not sure that will solve the problem but its possible there may be glitches in that version that will not be fixed. The 2.3 API is going to go away in less than 6 months so one way or another I will need to update to v 2.4.

Best,

Joe

2/21/2012 10:12:13 AM
Gravatar
Total Posts 87

Re: In Site Analytics for multisite

Hi Joe,

have one other interestin fact - now i think that problems is in metrics section:

1) i put in ga:pagePath  in dimensions (same as in your sample), and put only ga:pageviews in metrics - everything looks fine, no any unexpected data

2) i change  metrics to "ga:pageviews,ga:visits" - and here we are - i see one extra link from other subsite.

3) i've tryed all other items in the list "ga:pageviews,ga:visits,ga:newVisits,ga:entrances,ga:bounces" all works ok untill i add "ga:visits"

so i suspect this "counts total number of sessions" has all sessions, includin sessions started in other parts of domain (my other subsites) and they sore url from where user started the session, they include this tsatistics in the account because "this session was here" but to identify it they show some non-relevant url in this case.

not sure but may be it will be good idea just to loose entries that have 0 in "Page Views" column - this will clean the list but will let us save "Visits" metric for other urls in the list.

Regards,

Victor

2/21/2012 10:12:51 AM
Gravatar
Total Posts 18439

Re: In Site Analytics for multisite

Hi Victor,

when i created the webserver it was under test domain name, now it is in production name and i made prefered domain name as production and left tes one, but links inside of in-site analitics page shows my old test domain but not current

Keep in mind that unless you have a host name filter on your main profile, if you have the same tracking code on your dev environment and it is still active, then it is also tracking traffic/page views and that data is mingling with the data from your production site and will appear in reports.

Best,

Joe

2/21/2012 10:55:51 AM
Gravatar
Total Posts 87

Re: In Site Analytics for multisite

Hi Joe,

no thi last question i mean other thing, when you open this link mydomain.com/mysubsite/Analytics/Default.aspx the links on that page somehow pointed to myTESTdomain.com/mysubsite/Analytics/TodaysTraffic.aspx etc. but now i can't repro this situation. ok it is not so important. lets better filter out the extra entryies problem.

Regards,

Victor

2/21/2012 11:52:55 AM
Gravatar
Total Posts 18439

Re: In Site Analytics for multisite

Hi Victor,

You may be right that visits is a global thing since it counts total sessions they may not break it down by filtered profiles.

Try adding this as a filter in the query tool and see if it solves it

ga:pageviews>0

Best,

Joe

2/21/2012 1:37:25 PM
Gravatar
Total Posts 87

Re: In Site Analytics for multisite

Hi Joe,

yes ga:pageviews>0 filtered the unneeded entries correclty.

Regards,

Victor

2/21/2012 2:04:13 PM
Gravatar
Total Posts 18439

Re: In Site Analytics for multisite

Hi Victor,

Ok, I will add that to the query used in that report for the next release of In Site Analytics Pro.

Best,

Joe

2/21/2012 4:11:14 PM
Gravatar
Total Posts 18439

Re: In Site Analytics for multisite

Hi Victor,

Was that the only report that had problems or are there more to work through?

I may make a new release of In Site Analytics Pro soon to get this fix to you, so I wanted to make sure if it is the only one.

Thanks,

Joe

2/22/2012 2:04:33 AM
Gravatar
Total Posts 87

Re: In Site Analytics for multisite

Hi Joe,

i found this issue in 2 reports: "todays traffic" and "content analysis report".

also just noticed that when i click Query Editor link in subsites it logs next error

System.NullReferenceException: Object reference not set to an instance of an object.
at sts.Analytics.UI.QueryEditorPage.PopulateLabels()
at sts.Analytics.UI.QueryEditorPage.Page_Load(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

in /Analytics/QueryEditor.aspx

- this is  probably one more misconfiguration i made? can you advise?

Regards,

Victor

You must sign in to post in the forums. This thread is closed to new posts.