Skip to content

Commit

Permalink
Documentation of parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Lauko committed Jun 30, 2017
1 parent c183389 commit e4d143b
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ extensions:
googleAnalytics: XRuff\App\UI\Components\DI\GoogleAnalyticsExtension

googleAnalytics:
code: UA-4564988-3
user: on # on/off - dispalay user ID
code: UA-123456789-1
user: on # on/off - display user ID is user is logged in
```
Base presenter:
Expand Down Expand Up @@ -61,6 +61,16 @@ abstract class BasePresenter extends Nette\Application\UI\Presenter
...
```

You can invoke parameters into control in latte template. 1st parameter is GA code. 2nd parameter should be boolean and manage displaying GA directive for user's session - `ga('set', 'userId', {$user->id});`. Both parameters are optioanl.

```smarty
...
</head>
<body>
{control googleAnalytics 'UA-123456789-2', false}
...
```

-----

Repository [https://github.com/XRuff/GoogleAnalytics](https://github.com/XRuff/GoogleAnalytics).

0 comments on commit e4d143b

Please sign in to comment.