[SOLVED] Click Tracking Analytics |
5/1/2015 14:32:01 | |
| PHPRunner General questions | ||
|
S
salus1 authorDevClub member
Has anyone got a method that could be used to track queries and clicks in a public PHPRunner-based web catalog? |
||
|
|
Sergey Kornilov admin 5/4/2015 |
|
Google Analytics? |
|
|
S
|
salus1 authorDevClub member 5/4/2015 |
|
Thanks for your reply. Google Analytics Flow Visualization is close but I'm wondering if there isn't a much simpler way to this without the overhead. Is there a way to utilize PHPRunner's capability to save searches, automatically writing each query to a log? |
|
|
|
Sergey Kornilov admin 5/4/2015 |
|
You can definitely do that using events like BeforeSQLQuery: |
|
|
S
|
salus1 authorDevClub member 5/4/2015 |
|
Thanks for this info. It seems like this is more for altering a query on the fly as opposed to capturing the query parameters. Any chance of example event code for capturing the query parameters and writing them to a database? |
|
|
|
Sergey Kornilov admin 5/4/2015 |
|
$strSQL variable contains the whole SQL query. This is all what you need. |
|
|
S
|
salus1 authorDevClub member 5/4/2015 |
|
OK, thanks. I added the event as suggested... |
|
|
S
|
salus1 authorDevClub member 5/4/2015 |
|
Put my thinking cap on and did a PHP str_replace... |
|