Sitecore 8.1 xDB data capture requirements - sitecore

We have just upgraded our 7.2 platform to 8.1. We have enabled xDB as well.
I've following questions:
Do we need to write any custom code (JS or C#code) to capture analytics data on to xDB?
What sort of data is captured by default and what sort of data requires custom code?
Thanks.

1) No custom code is required by default. You just need to make sure that configuration files are properly setup. Sitecore Analytics and xDB features are enabled when you install Sitecore. In Sitecore 8.0 you only need to have "Analytics.Enabled" set on "true" in Sitecore.Analytics.config but in Sitecore 8.1 because they have introduced the notion of separation of xDB and core sitecore functionality you also need to have the extra license for xDB and having "Xdb.enabled" in Sitecore.Xdb.config as well. Also make sure that you have an installed and running MongoDB on your machine since xDB is actually consisted of MongoDB and SQL server (both)
Also have a look on following links about CMS-only mode in Sitecore 8.1:
CMS-only mode: an overview
Sitecore 8.1: what does new CMS-only mode mean
2) Sitecore xDB collects visitors' information in "Contacts" collection on MongoDB and the actual visits in "Interaction" collection on MongoDB (in JSON format) and then it processes raw data to generate statistics and store them into SQL server (separate database for analytics). In general, Sitecore shows you various statistics based on "PageViews" and "Engagement Values" side by side on dozens of charts. Checkout "ReportDataView" and "TrafficOverview" views on SQL server (once you setup xDB up and running) to have some ideas about what is it doing.
Anyway, in many cases you may find the ready-to-use charts and graphs are not enough so you can also have direct access to raw data in MongoDB or aggregated counterpart in SQL server and you can also write your extra pieces of info on each page so that you can extract them later on Experience Analytics.

Related

How CD event queue knows about Master in WFFM approval? 8.2

CD should not be knowing about Master as CD has Web database. But in WFFM sometimes we need to approve something (eg: public review on a public site). This approval should go to Master for the content publisher to approve.
earlier( before 8.0) we had remoteWfmService connectionstring. But now(using 8.2.3) we have event queues. So how does event queue learn about Master DB? My answers and confusion is given below.
Enabling /App_Config/Include/ScalabilitySettings.config and providing publishing.publishingInstance setting with machinename-IISinstance of CMS. Correct?
But is eventqueue enabled just by enabling a config? I mean there is no EnableEventQueues settings(switch/toggle) in 8.2.3.
If the above file is not enabled then from webconfig (but where? )
Any other place?
As you already mentioned the Event Queue is Used by WFFM.
On scaled environments where the content delivery servers have no access to the master database. You need something to transfer the form field values to the CMS server for processing the remote save actions on the CMS server. Since Sitecore Web Forms for Marketers 8.0 rev.150224 (Update-2) The Sitecore EventQueue is used, on older versions the "remoteWfmService" web-service is used.
It is about the EventQueue SQL database table from the Sitecore Core database.
It is important that the CM uses the same core database as the CD. Or sync at least the EventQueue table. You can easily recognize the WFFM records on the EventType.
For Sitecore 8.1 I did not find a way to easily customize the event queue mechanism. I assume same for 8.2
See also: http://sitecore.stockpick.nl/english/wffm-and-secure-fields/ for more details of the data submit flow.
None of the above was needed for me.
In CD, Sitecore.Forms.Config
<setting name="WFM.SharedDatabase" value="web" />
<setting name="WFM.MasterDatabase" value="web"/>
I got this info from https://doc.sitecore.net/cloud/81/azure/configuring_sitecore_azure/walkthrough_installing_wffm_on_sitecore_azure?roles=developer
ScalabilitySettings.config was not used for this apparently (mine remain disabled)
This resulted in my entries reaching master DB(from CD). But I am still not sure how it reached there. Or How was master contacted in spite of not providing "master" connection string?! Also another strange thing is 'web' is not a shared db as provided in the settings above. 'core' is default value but even core was not shared between CMS and CD in my case. Separate Core + Web on CD & Core + Master on CMS.

How do I clean xDB in Sitecore?

Have recently tried working with xDB in Sitecore 8 and now looking for the way of cleaning out current stats from xDB without re-installing Sitecore. I deleted data files for Mongo (as was suggested) but still see figures in Analytics in Sitecore; also did iisreset but also did not help. What am I doing wrong? (I am new to Sitecore so might be missing something).
Have you tried to clean-up only MongoDB files, without Reporting database?
If yes, I think that is a point of your confusion. The way it works in xDB is that all tracking analytics data is written into Mongo and then by SessionEnd processed and saved into Reporting database, that is SQL database, same way as it was before previously in DMS. In that case you need to clean that database as well.
If you have access to SQL, you may use __DeleteAllReportingData stored procedure as the quickest:
More correct approach that goes well for instances where there is no direct access to DB is using admin tool for that located at /sitecore/admin/RebuildReportingDB.aspx. Also there was a module Analytics Database Manager previously, however I do not know its current state.
Reference: Walkthrough: Rebuilding the reporting database (from official documentation)

sitecore is failing to publish language versions to web database

We have upgraded Sitecore to 7.1, but we are experiencing a problem with publishing.
We create a new item in the master database in English, then we publish this item, switch to the web database to check if it's there, which it is, however... The item does not have a version! Therefore the item is not displaying on the website.
Any ideas as to what could be causing this?
Thanks.
I was having the same issue with Sitecore 8+ where i was able to add language specific content but couldn't publish it. Figured out how to resolve it
1) First Language needs to be registered in \sitecore\system\languages by defining the language to be use.
2) Publish these language items first before publishing content else the behavior will be the same.
3) After publishing languages, then publish the content. In the publish window you will see the language under "Publishing language" section and select the language to publish the content.
Make sure that parent items have a version as well and are also in final state if they are part of a workflow.
I had problems with publishing because I didn't have a language version in one of my parents. In my case it was a parent folder under the content node.
Hope it helps.
Al
Please try republishing your entire site. In some cases, a part of the tree hierarchy might be missing in the Web DB, due to which, publishing the child nodes wouldnt work. Republishing the site can eliminate this chance.
This has been resolved.
It turns out that the SQL server did not have enough space for a full publish. A full publish had been attempted and failed due to the lack of space on the SQL server. subsequently this had corrupted the database.
We had to restore an earlier version of the database and ensure the SQL server had plenty of space for the full publish to finish.
I ran into this issue earlier with my Sitecore 7.2 upgrade. The key here is to ensure the items, templates and layouts (associated with the item) all has appropriate language+versions in master db. In my case, we were also using Partial Language fallback and needed to make that was working proper as well.
Once you identify the item (with missing versions), add them and republish the whole item. For few template types I noticed Sitecore was still not publishing properly. Ex: Items based off Sublayout Folder template. The fix was easy in this case as I changed the template type to Folder and republished.
Also switch to web database in sitecore client and ensure you are able to preview the item (from web db)
Hope this helps.

How to publish multiple versions of content item to delivery (web database) in Sitecore?

I have a requirement to allow users of the web site to see the current publish version of the item (which has passed through workflow) + the previous versions + the version scheduled to publish in future.
So when the use visit the content item on the web site they will be presented with tabs to: previous , current and future version of the item.
I have seen some articles how to intercept publishing pipeline but still cannot evaluate if this scenario is possible.
There is no native way to allow multiple versions to be published live at a given time. This comes down to how the publishing process works for Sitecore. At a high-level, let me explain:
The authoring environment which uses the master database contains 0-n versions of each item. When a user decides to publish a piece of content, only the latest version marked as "final" will be published to the publishing target database, e.g. usually the web database. The publishing target database (e.g. web) will always only have ONE VERSION of a given item, unlike the master database.
Let me say that again:
The front-end public-facing website's database
only has ONE VERSION of a given content item at any time.
Since you indicated the front-end of the site needs to show three versions coming from:
Previous
Current
Future
This means that the pure requirement of showing a "future" version to be published means your site would not use a typical master-to-web publishing model and would instead need to run in "live mode" which runs from the master database. As I said, you would not even publish at all and would render content as you edit/save it.
So, for this reason, you'd need to code your front-end presentation component(s) which generate the tabs to query the item and get the current version, the previous version (assuming it was "final"), and a previous version (assuming its "final").

Sitecore development and demo servers

I'm attempting to get an understanding of what is a best practice / recommended setup for moving information between multiple Sitecore installations. I have a copy of Sitecore setup on my machine for development. We need a copy of the system setup for demonstration to the client and for people to enter in content prelaunch. How should I set things up so I people can enter content / modify the demonstration version of the site and still allow me to continue development on my local machine and publish my updates without overwriting changes between the systems? Or is this not the correct approach for me to be taking?
I believe that the 'publishing target' feature is what I need to use, but as this is my first project working with Sitecore and so I am looking for practical experience on how to manage this workflow.
Nathan,
You didn't specify what version of Sitecore, but I will assume 6.01+
Leveraging publishing targets will allow you to 'publish' your development Sitecore tree (or sub-trees) from your development environment to the destination, such as your QA server. However, there is potential that you publish /sitecore/content/home/* and then you wipe out your production content!
Mark mentioned using "Sitecore Packages" to move your content (as well as templates, layout items, etc...) over, which is the traditional way of moving items between environments. Also, you didn't specify what version of Sitecore you are using, but the Staging Module is not needed for Sitecore 6.3+. The Staging Module was generally used to keep file systems in sync and to clear the cache of Content Delivery servers.
However, the one piece of the puzzle that is missing here is that, you will still need to update your code (.jpg, .css, .js, .dll, .etc) on the QA box.
The optimal solution would be to have your Sitecore items (templates, layout item, rendering items, and developer owned content items) in Source control right alongside your ASP.NET Web Application and any class library projects you may have. At a basic level, you can do this using built in "Serialization" features of Sitecore. Lars Nielsen wrote an article touching on this.
To take this to the next level, you would use a tool such as Team Development for Sitecore. This tool will allow you to easily bring your Sitecore items into Visual Studio and treat them as code. At this point you could setup automated builds, or continuous integration, so that your code and Sitecore items, are automatically pushed to your QA environment. There are also configuration options to handle the scenario of keeping production content in place while still deploying developer owned items.
I recommend you looks at the staging module if you need to publish to multiple targets from the same instance, i.e. publish content from one tree over a firewall to a development site, to a QA site, etc.
If you're just migrating content from one instance to another piecemeal, you can use Sitecore packages which are standard tools to move content. The packages serialize the content to XML and zip it up and allow you to install them in other instances.