1

Actually I am in need of counting the visitors count for a particular document.

I can do it by adding a field, and increasing its value.

But the problem is following.,

I have 10 replication copies in different location. It is being replicated by scheduled manner. So replication conflict is happening because of document count is editing the same document in different location.

4 Answers4

3

I would use an external solution for this. Just search for "visitor count" in your favorite search engine and choose a third party tool. You can then display the count on the page if that is important.

If you need to store the value in the database for some reason, perhaps you could store it as a new doc type that gets added each time (and cleaned up later) to avoid the replication issues.

Otherwise if storing it isn't required consider Google Analytics too.

Ken Pespisa
  • 21,989
  • 3
  • 55
  • 63
1

Also I faced this problem. I can not say that it has a easy solution. Document locking is the only solution that i had found. But the visitor's count is not possible.

Ramkumar
  • 874
  • 11
  • 27
0

It is possible, but not by updating the document. Instead have an AJAX call to an agent or form with parameters on the URL identifying the document being read. This call writes a document into a tracking DB with one or two views and then determines from those views how many reads you have had. The number of reads is the return value of the AJAX form.

This can be written in LS, Java or @Formulas. I would try to do it 100% in @Formulas to make it as efficient as possible.

You can also add logic to exclude reads from the same user or same source IP address.

The tracking database then replicates using the same schedule as the other database.

Daily or Hourly agents can run to create summary documents and delete the detail documents so that you do not exceed the limits for @DBLookup.

If you do not need very nearly real time counts (and that is the best you can get with replicated system like this) you could use the web logs that domino generates by finding the reads in the logs and building the counts in a document per server.

/Newbs

Newbs
  • 1,632
  • 11
  • 16
0

Back in the 90s, we had a client that needed to know that each person had read a document without them clicking to sign or anything.

The initial solution was to add each name to a text field on a separate tracking document. This ran into problems when it got over 32k real fast. Then, one of my colleagues realized you could just have it create a document for each user to record that they'd read it.

Heck, you could have one database used to track all reads for all users of all documents, since one user can only open one document at a time -- each time they open a new document, either add that value to a field or create a field named after the document they've read on their own "reader tracker" document.

Or you could make that a mail-in database, so no worries about replication. Each time they open a document for which you want to track reads, it create a tiny document that has only their name and what document they read which gets mailed into the "read counter database". If you don't care who read it, you have an agent that runs on a schedule that updates the count and deletes the mailed-in documents.

There really are a lot of ways to skin this cat.

David Navarre
  • 1,022
  • 10
  • 27