Is there a specific pattern for tracking Header Referrer Data in IHP apps?

45 Views Asked by At

Anyone have a recommendation/pattern for tracking HTTP: Referrer header data in an IHP app? I was thinking it might be best to add it to the beforeAction in the Static Controller for the app landing page but it could just as well go in the initContext in FrontController?

I'm wondering if there is a strong technical argument for one over the other.

1

There are 1 best solutions below

0
On BEST ANSWER

If you want to track it across the full application, use initContext in FrontController. If you only want it for specific controllers, go with beforeAction.

From a technical standpoint there's no major difference between these two places.